File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2049,9 +2049,14 @@ void MainWindow::ShowAchievementSettings()
20492049
20502050void MainWindow::OnHardcoreChanged ()
20512051{
2052- if (AchievementManager::GetInstance ().IsHardcoreModeActive ())
2052+ bool hardcore_active = AchievementManager::GetInstance ().IsHardcoreModeActive ();
2053+ if (hardcore_active)
20532054 Settings::Instance ().SetDebugModeEnabled (false );
2054- emit Settings::Instance ().EmulationStateChanged (Core::GetState (Core::System::GetInstance ()));
2055+ // EmulationStateChanged causes several dialogs to redraw, including anything affected by hardcore
2056+ // mode. Every dialog that depends on hardcore mode is redrawn by EmulationStateChanged.
2057+ if (hardcore_active != m_former_hardcore_setting)
2058+ emit Settings::Instance ().EmulationStateChanged (Core::GetState (Core::System::GetInstance ()));
2059+ m_former_hardcore_setting = hardcore_active;
20552060}
20562061#endif // USE_RETRO_ACHIEVEMENTS
20572062
Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ class MainWindow final : public QMainWindow
270270#ifdef USE_RETRO_ACHIEVEMENTS
271271 AchievementsWindow* m_achievements_window = nullptr ;
272272 Config::ConfigChangedCallbackID m_config_changed_callback_id;
273+ bool m_former_hardcore_setting = false ;
273274#endif // USE_RETRO_ACHIEVEMENTS
274275
275276 AssemblerWidget* m_assembler_widget;
You can’t perform that action at this time.
0 commit comments