From 57ca5dd2c2250c0988e361baea4508af2cd70db3 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 5 Nov 2024 14:12:41 +1000 Subject: [PATCH] ImGuiFullscreen: Default input source to keyboard if none --- src/util/imgui_fullscreen.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/util/imgui_fullscreen.cpp b/src/util/imgui_fullscreen.cpp index 62d77317d..a8784b428 100644 --- a/src/util/imgui_fullscreen.cpp +++ b/src/util/imgui_fullscreen.cpp @@ -675,8 +675,12 @@ ImGuiFullscreen::FocusResetType ImGuiFullscreen::GetQueuedFocusResetType() void ImGuiFullscreen::ForceKeyNavEnabled() { ImGuiContext& g = *ImGui::GetCurrentContext(); - g.ActiveIdSource = (g.ActiveIdSource == ImGuiInputSource_Mouse) ? ImGuiInputSource_Keyboard : g.ActiveIdSource; - g.NavInputSource = (g.NavInputSource == ImGuiInputSource_Mouse) ? ImGuiInputSource_Keyboard : g.ActiveIdSource; + g.ActiveIdSource = (g.ActiveIdSource == ImGuiInputSource_Mouse || g.ActiveIdSource == ImGuiInputSource_None) ? + ImGuiInputSource_Keyboard : + g.ActiveIdSource; + g.NavInputSource = (g.NavInputSource == ImGuiInputSource_Mouse || g.NavInputSource == ImGuiInputSource_None) ? + ImGuiInputSource_Keyboard : + g.ActiveIdSource; g.NavDisableHighlight = false; g.NavDisableMouseHover = true; }