diff options
| author | JosJuice <josjuice@gmail.com> | 2024-06-26 20:34:16 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2024-06-26 20:36:46 +0200 |
| commit | bc67fc97c39628c76a4dbca411b0e8a9bfaf726a (patch) | |
| tree | 6b7cfcbf4ad79b125db6aa96c83a7d022b514c34 /Source/Core/DolphinQt/MainWindow.cpp | |
| parent | 3dbaf38eae8415f6ed8420ab36b49358c39cf3eb (diff) | |
Revert "Audit uses of IsRunning and GetState"
This reverts commit 72cf2bdb87f09deff22e1085de3290126aa4ad05.
SYSCONF settings are getting cleared when they shouldn't be. Let's
revert the change until I get proper time to figure out why it's broken.
Diffstat (limited to 'Source/Core/DolphinQt/MainWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/MainWindow.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 0bef377f07..f62a7496e7 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -905,7 +905,7 @@ void MainWindow::OnStopComplete() bool MainWindow::RequestStop() { - if (Core::IsUninitialized(Core::System::GetInstance())) + if (!Core::IsRunning(Core::System::GetInstance())) { Core::QueueHostJob([this](Core::System&) { OnStopComplete(); }, true); return true; @@ -1112,7 +1112,7 @@ void MainWindow::StartGame(std::unique_ptr<BootParameters>&& parameters) } // If we're running, only start a new game once we've stopped the last. - if (!Core::IsUninitialized(Core::System::GetInstance())) + if (Core::GetState(Core::System::GetInstance()) != Core::State::Uninitialized) { if (!RequestStop()) return; @@ -1536,7 +1536,7 @@ void MainWindow::NetPlayInit() bool MainWindow::NetPlayJoin() { - if (!Core::IsUninitialized(Core::System::GetInstance())) + if (Core::IsRunning(Core::System::GetInstance())) { ModalMessageBox::critical(nullptr, tr("Error"), tr("Can't start a NetPlay Session while a game is still running!")); @@ -1603,7 +1603,7 @@ bool MainWindow::NetPlayJoin() bool MainWindow::NetPlayHost(const UICommon::GameFile& game) { - if (!Core::IsUninitialized(Core::System::GetInstance())) + if (Core::IsRunning(Core::System::GetInstance())) { ModalMessageBox::critical(nullptr, tr("Error"), tr("Can't start a NetPlay Session while a game is still running!")); @@ -1850,7 +1850,7 @@ void MainWindow::OnImportNANDBackup() result.wait(); - m_menu_bar->UpdateToolsMenu(Core::State::Uninitialized); + m_menu_bar->UpdateToolsMenu(Core::IsRunning(Core::System::GetInstance())); } void MainWindow::OnPlayRecording() @@ -1882,8 +1882,7 @@ void MainWindow::OnStartRecording() { auto& system = Core::System::GetInstance(); auto& movie = system.GetMovie(); - if (Core::GetState(system) == Core::State::Starting || - Core::GetState(system) == Core::State::Stopping || movie.IsRecordingInput() || + if (Core::GetState(system) == Core::State::Starting || movie.IsRecordingInput() || movie.IsPlayingInput()) { return; @@ -1915,7 +1914,7 @@ void MainWindow::OnStartRecording() { emit RecordingStatusChanged(true); - if (Core::IsUninitialized(system)) + if (!Core::IsRunning(system)) Play(); } } |
