Merge pull request #12815 from Dentomologist/enable_hotkeys_and_controllers_for_focused_tas_input

TAS Input: Enable emulator hotkeys and controller input when TAS Input window has focus
This commit is contained in:
Admiral H. Curtiss
2024-06-15 15:25:40 +02:00
committed by GitHub
14 changed files with 92 additions and 7 deletions

View File

@ -1067,7 +1067,8 @@ void UpdateInputGate(bool require_focus, bool require_full_focus)
{
// If the user accepts background input, controls should pass even if an on screen interface is on
const bool focus_passes =
!require_focus || (Host_RendererHasFocus() && !Host_UIBlocksControllerState());
!require_focus ||
((Host_RendererHasFocus() || Host_TASInputHasFocus()) && !Host_UIBlocksControllerState());
// Ignore full focus if we don't require basic focus
const bool full_focus_passes =
!require_focus || !require_full_focus || (focus_passes && Host_RendererHasFullFocus());