mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
Core::GetState: Avoid Global System Accessor
This commit is contained in:
@ -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
|
||||
{
|
||||
|
@ -199,7 +199,7 @@ void PlatformX11::ProcessEvents()
|
||||
}
|
||||
else if (key == XK_F10)
|
||||
{
|
||||
if (Core::GetState() == Core::State::Running)
|
||||
if (Core::GetState(Core::System::GetInstance()) == Core::State::Running)
|
||||
{
|
||||
if (Config::Get(Config::MAIN_SHOW_CURSOR) == Config::ShowCursor::Never)
|
||||
XUndefineCursor(m_display, m_window);
|
||||
@ -245,8 +245,10 @@ void PlatformX11::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)
|
||||
{
|
||||
XDefineCursor(m_display, m_window, m_blank_cursor);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case FocusOut:
|
||||
|
Reference in New Issue
Block a user