From 6310f699e1f4d04dab0cd45d32a9e8830477747f Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Wed, 20 Mar 2024 18:31:28 +0100 Subject: [PATCH] Fix cursor focus for gamepads, once again, #566 hopefully it works now... --- neo/ui/UserInterface.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neo/ui/UserInterface.cpp b/neo/ui/UserInterface.cpp index bab78000..8c149628 100644 --- a/neo/ui/UserInterface.cpp +++ b/neo/ui/UserInterface.cpp @@ -587,8 +587,10 @@ const char *idUserInterfaceLocal::Activate(bool activate, int _time) { time = _time; active = activate; if ( desktop ) { - // DG: added this hack for gamepad input - if ( interactive ) { + // DG: added this hack for gamepad input - Note that it can happen that + // a UI has been made non-interactive before Activate(false, ..) is called + // and it still needs to be unregistered with Sys_SetInteractiveIngameGuiActive()! + if ( interactive || !activate ) { Sys_SetInteractiveIngameGuiActive( activate, this ); } // DG end activateStr = "";