diff --git a/Source/Core/Core/AchievementManager.cpp b/Source/Core/Core/AchievementManager.cpp index c0b35d430f..7bb1cfa7eb 100644 --- a/Source/Core/Core/AchievementManager.cpp +++ b/Source/Core/Core/AchievementManager.cpp @@ -884,10 +884,14 @@ void AchievementManager::SetDisabled(bool disable) INFO_LOG_FMT(ACHIEVEMENTS, "Achievement Manager has been disabled."); OSD::AddMessage("Please close all games to re-enable achievements.", OSD::Duration::VERY_LONG, OSD::Color::RED); + m_update_callback(); } if (previously_disabled && !disable) + { INFO_LOG_FMT(ACHIEVEMENTS, "Achievement Manager has been re-enabled."); + m_update_callback(); + } }; const AchievementManager::NamedIconMap& AchievementManager::GetChallengeIcons() const @@ -926,6 +930,7 @@ void AchievementManager::Logout() { std::lock_guard lg{m_lock}; CloseGame(); + SetDisabled(false); m_player_badge.name.clear(); Config::SetBaseOrCurrent(Config::RA_API_TOKEN, ""); } @@ -937,6 +942,7 @@ void AchievementManager::Logout() void AchievementManager::Shutdown() { CloseGame(); + SetDisabled(false); m_is_runtime_initialized = false; m_queue.Shutdown(); // DON'T log out - keep those credentials for next run. diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index d0a399d939..5ad626f56e 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -170,7 +170,8 @@ void SConfig::SetRunningGameMetadata(const std::string& game_id, const std::stri return; #ifdef USE_RETRO_ACHIEVEMENTS - AchievementManager::GetInstance().SetDisabled(true); + if (game_id != "00000000") + AchievementManager::GetInstance().SetDisabled(true); #endif // USE_RETRO_ACHIEVEMENTS if (game_id == "00000000") diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index ce23f41fb5..c7c392fa0e 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -291,6 +291,7 @@ void Stop() // - Hammertime! #ifdef USE_RETRO_ACHIEVEMENTS AchievementManager::GetInstance().CloseGame(); + AchievementManager::GetInstance().SetDisabled(false); #endif // USE_RETRO_ACHIEVEMENTS s_is_stopping = true; diff --git a/Source/Core/DolphinQt/Achievements/AchievementHeaderWidget.cpp b/Source/Core/DolphinQt/Achievements/AchievementHeaderWidget.cpp index 9bbec01a9f..e844d22d39 100644 --- a/Source/Core/DolphinQt/Achievements/AchievementHeaderWidget.cpp +++ b/Source/Core/DolphinQt/Achievements/AchievementHeaderWidget.cpp @@ -150,10 +150,7 @@ void AchievementHeaderWidget::UpdateData() m_game_progress_hard->setVisible(false); m_game_progress_soft->setVisible(false); m_rich_presence->setVisible(false); - if (instance.IsDisabled()) - { - m_locked_warning->setVisible(true); - } + m_locked_warning->setVisible(instance.IsDisabled()); } }