Core::GetState: Avoid Global System Accessor

This commit is contained in:
mitaclaw
2024-03-28 11:35:13 -07:00
parent db0cd82326
commit eb92d6f0a8
42 changed files with 135 additions and 101 deletions

View File

@ -42,7 +42,8 @@
- (void)togglePause
{
if (Core::GetState() == Core::State::Running)
auto& system = Core::System::GetInstance();
if (Core::GetState(system) == Core::State::Running)
Core::SetState(Core::State::Paused);
else
Core::SetState(Core::State::Running);
@ -263,8 +264,10 @@ void PlatformMacOS::ProcessEvents()
{
m_window_focus = true;
if (Config::Get(Config::MAIN_SHOW_CURSOR) == Config::ShowCursor::Never &&
Core::GetState() != Core::State::Paused)
Core::GetState(Core::System::GetInstance()) != Core::State::Paused)
{
[NSCursor unhide];
}
}
else
{