TAS Input: Enable hotkeys and controller input when Input has focus
Enable emulator hotkeys and controller input (when that option is enabled) when a TAS Input window has focus, as if it was the render window instead. This allows TASers to use frame advance and the like without having to switch the focused window or disabling Hotkeys Require Window Focus which also picks up keypresses while other apps are active. Cursor updates are disabled when the TAS Input window has focus, as otherwise the Wii IR widget (and anything else controlled by the mouse) becomes unusable. The cursor continues to work normally when the render window has focus.
This commit is contained in:
1 parent
8ac22378a1
commit
c3bdd05d2a
14 files changed
+92
-7
No files matched your search
@@ -1073,7 +1073,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());
|
||||
|
||||
@@ -53,6 +53,7 @@ bool Host_UIBlocksControllerState();
|
||||
bool Host_RendererHasFocus();
|
||||
bool Host_RendererHasFullFocus();
|
||||
bool Host_RendererIsFullscreen();
|
||||
bool Host_TASInputHasFocus();
|
||||
|
||||
void Host_Message(HostMessageID id);
|
||||
void Host_PPCSymbolsChanged();
|
||||
|
||||
Reference in new issue
Block a user