diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2024-05-04 18:19:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-04 18:19:50 +0200 |
| commit | 1a2e315880a68475ebd19e348cf89d9dc3f5f678 (patch) | |
| tree | ce6579a8f30967bdf5843b1bb7a1866d8438c9ff /Source/Core/DolphinQt/MainWindow.cpp | |
| parent | 98f0f844fb9a4f4f76280c57d74b0adfba6aff3f (diff) | |
| parent | 0b04975c2680ee559131bad95b130c94ec4eb6a3 (diff) | |
Merge pull request #12761 from mitaclaw/core-global-system-5
Core::SetState: Avoid Global System Accessor
Diffstat (limited to 'Source/Core/DolphinQt/MainWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/MainWindow.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index a96b8be809..c8e04a0fd0 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -825,7 +825,7 @@ void MainWindow::Play(const std::optional<std::string>& savestate_path) // Otherwise, prompt for a new game. if (Core::GetState(Core::System::GetInstance()) == Core::State::Paused) { - Core::SetState(Core::State::Running); + Core::SetState(Core::System::GetInstance(), Core::State::Running); } else { @@ -853,7 +853,7 @@ void MainWindow::Play(const std::optional<std::string>& savestate_path) void MainWindow::Pause() { - Core::SetState(Core::State::Paused); + Core::SetState(Core::System::GetInstance(), Core::State::Paused); } void MainWindow::TogglePause() @@ -932,7 +932,7 @@ bool MainWindow::RequestStop() bool pause = !Settings::Instance().GetNetPlayClient(); if (pause) - Core::SetState(Core::State::Paused); + Core::SetState(Core::System::GetInstance(), Core::State::Paused); if (rendered_widget_was_active) { @@ -962,7 +962,7 @@ bool MainWindow::RequestStop() m_render_widget->SetWaitingForMessageBox(false); if (pause) - Core::SetState(state); + Core::SetState(Core::System::GetInstance(), state); return false; } @@ -984,7 +984,7 @@ bool MainWindow::RequestStop() // Unpause because gracefully shutting down needs the game to actually request a shutdown. // TODO: Do not unpause in debug mode to allow debugging until the complete shutdown. if (Core::GetState(Core::System::GetInstance()) == Core::State::Paused) - Core::SetState(Core::State::Running); + Core::SetState(Core::System::GetInstance(), Core::State::Running); // Tell NetPlay about the power event if (NetPlay::IsNetPlayRunning()) |
