Skip to content

Commit

Permalink
FullscreenUI: Fix nav focus loss on input bind
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Nov 16, 2024
1 parent d56bcfa commit bb450d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/fullscreen_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1798,6 +1798,7 @@ void FullscreenUI::BeginInputBinding(SettingsInterface* bsi, InputBindingInfo::T
bsi->SetStringValue(s_input_binding_section.c_str(), s_input_binding_key.c_str(), new_binding.c_str());
SetSettingsChanged(bsi);
ClearInputBindingVariables();
QueueResetFocus(FocusResetType::PopupClosed);
return InputInterceptHook::CallbackResult::RemoveHookAndStopProcessingEvent;
}

Expand Down Expand Up @@ -1828,6 +1829,7 @@ void FullscreenUI::DrawInputBindingWindow()
{
InputManager::RemoveHook();
ClearInputBindingVariables();
QueueResetFocus(FocusResetType::PopupClosed);
return;
}

Expand All @@ -1844,7 +1846,8 @@ void FullscreenUI::DrawInputBindingWindow()
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, LayoutScale(20.0f, 20.0f));

if (ImGui::BeginPopupModal(title, nullptr,
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoInputs))
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollWithMouse |
ImGuiWindowFlags_NoCollapse))
{
ImGui::TextWrapped("%s", SmallString::from_format(FSUI_FSTR("Setting {} binding {}."), s_input_binding_section,
s_input_binding_display_name)
Expand Down

0 comments on commit bb450d5

Please sign in to comment.