Merge pull request #12828 from JosJuice/unify-state-variables-2

Clean up Core::GetState
This commit is contained in:
Admiral H. Curtiss
2024-06-22 20:20:54 +02:00
committed by GitHub
40 changed files with 191 additions and 178 deletions

View File

@ -159,7 +159,8 @@ void HotkeyScheduler::Run()
if (!HotkeyManagerEmu::IsEnabled())
continue;
if (Core::GetState(Core::System::GetInstance()) != Core::State::Stopping)
Core::System& system = Core::System::GetInstance();
if (Core::GetState(system) != Core::State::Stopping)
{
// Obey window focus (config permitting) before checking hotkeys.
Core::UpdateInputGate(Config::Get(Config::MAIN_FOCUSED_HOTKEYS));
@ -187,7 +188,7 @@ void HotkeyScheduler::Run()
if (IsHotkey(HK_EXIT))
emit ExitHotkey();
if (!Core::IsRunningAndStarted())
if (Core::IsUninitialized(system))
{
// Only check for Play Recording hotkey when no game is running
if (IsHotkey(HK_PLAY_RECORDING))