diff options
| author | JMC47 <JMC4789@gmail.com> | 2025-06-10 17:32:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-10 17:32:04 -0400 |
| commit | a16387741383ca00524f78f9854c55be7089cf93 (patch) | |
| tree | 3aa953ebc92a40d0bbf99d675428c8aa6ac92cc3 /Source/Core | |
| parent | 5800b874d7cf3cace856a56d3c30e1cc1c3c2caa (diff) | |
| parent | 417badc55c9eeb59c43f82439b287b2e00489076 (diff) | |
Merge pull request #13746 from LillyJadeKatrin/retroachievements-hardcore-changed
MainWindow - Avoid excessive emulation state changes
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt/MainWindow.cpp | 9 | ||||
| -rw-r--r-- | Source/Core/DolphinQt/MainWindow.h | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 3abbf4751d..d15ddef425 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -2010,9 +2010,14 @@ void MainWindow::ShowAchievementSettings() void MainWindow::OnHardcoreChanged() { - if (AchievementManager::GetInstance().IsHardcoreModeActive()) + bool hardcore_active = AchievementManager::GetInstance().IsHardcoreModeActive(); + if (hardcore_active) Settings::Instance().SetDebugModeEnabled(false); - emit Settings::Instance().EmulationStateChanged(Core::GetState(Core::System::GetInstance())); + // EmulationStateChanged causes several dialogs to redraw, including anything affected by hardcore + // mode. Every dialog that depends on hardcore mode is redrawn by EmulationStateChanged. + if (hardcore_active != m_former_hardcore_setting) + emit Settings::Instance().EmulationStateChanged(Core::GetState(Core::System::GetInstance())); + m_former_hardcore_setting = hardcore_active; } #endif // USE_RETRO_ACHIEVEMENTS diff --git a/Source/Core/DolphinQt/MainWindow.h b/Source/Core/DolphinQt/MainWindow.h index 272fd27b60..afb44f4608 100644 --- a/Source/Core/DolphinQt/MainWindow.h +++ b/Source/Core/DolphinQt/MainWindow.h @@ -267,6 +267,7 @@ private: #ifdef USE_RETRO_ACHIEVEMENTS AchievementsWindow* m_achievements_window = nullptr; Config::ConfigChangedCallbackID m_config_changed_callback_id; + bool m_former_hardcore_setting = false; #endif // USE_RETRO_ACHIEVEMENTS AssemblerWidget* m_assembler_widget; |
