mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
DolphinQt: Give hotkeys their own "background input" setting.
This commit is contained in:
@ -12,4 +12,6 @@ const ConfigInfo<bool> MAIN_USE_DISCORD_PRESENCE{{System::Main, "General", "UseD
|
||||
true};
|
||||
const ConfigInfo<bool> MAIN_USE_GAME_COVERS{{System::Main, "General", "UseGameCovers"}, false};
|
||||
|
||||
const ConfigInfo<bool> MAIN_FOCUSED_HOTKEYS{{System::Main, "General", "HotkeysRequireFocus"}, true};
|
||||
|
||||
} // namespace Config
|
||||
|
@ -18,5 +18,6 @@ namespace Config
|
||||
|
||||
extern const ConfigInfo<bool> MAIN_USE_DISCORD_PRESENCE;
|
||||
extern const ConfigInfo<bool> MAIN_USE_GAME_COVERS;
|
||||
extern const ConfigInfo<bool> MAIN_FOCUSED_HOTKEYS;
|
||||
|
||||
} // namespace Config
|
||||
|
@ -1050,11 +1050,10 @@ void DoFrameStep()
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateInputGate()
|
||||
void UpdateInputGate(bool require_focus)
|
||||
{
|
||||
ControlReference::SetInputGate(
|
||||
(SConfig::GetInstance().m_BackgroundInput || Host_RendererHasFocus()) &&
|
||||
!Host_UIBlocksControllerState());
|
||||
ControlReference::SetInputGate((!require_focus || Host_RendererHasFocus()) &&
|
||||
!Host_UIBlocksControllerState());
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
|
@ -112,6 +112,6 @@ void HostDispatchJobs();
|
||||
|
||||
void DoFrameStep();
|
||||
|
||||
void UpdateInputGate();
|
||||
void UpdateInputGate(bool require_focus);
|
||||
|
||||
} // namespace Core
|
||||
|
@ -826,7 +826,7 @@ void Update(u64 ticks)
|
||||
|
||||
if (s_half_line_of_next_si_poll == s_half_line_count)
|
||||
{
|
||||
Core::UpdateInputGate();
|
||||
Core::UpdateInputGate(!SConfig::GetInstance().m_BackgroundInput);
|
||||
SerialInterface::UpdateDevices();
|
||||
s_half_line_of_next_si_poll += 2 * SerialInterface::GetPollXLines();
|
||||
}
|
||||
|
Reference in New Issue
Block a user