From 137e50dc25d67879ebf2827e3fd5cc754d4d19d7 Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Sat, 17 May 2025 08:12:43 -0400 Subject: [PATCH] AchievementManager: Remove CloseGame from LoadGameCallback This was causing deadlocks when a game didn't load (including if RetroAchievements does not yet support it) because it was attempting to close the queue the the callback was currently running on, forcing LoadGameCallback to wait for LoadGameCallback to finish. However, it appears that recent changes to the queue have independently resolved the reason CloseGame was being called here in the first place. --- Source/Core/Core/AchievementManager.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/Core/Core/AchievementManager.cpp b/Source/Core/Core/AchievementManager.cpp index b6fc4e0cc3..dba87f2864 100644 --- a/Source/Core/Core/AchievementManager.cpp +++ b/Source/Core/Core/AchievementManager.cpp @@ -994,22 +994,22 @@ void AchievementManager::LoadGameCallback(int result, const char* error_message, OSD::Duration::VERY_LONG, OSD::Color::RED); OSD::AddMessage("Please update Dolphin to a newer version.", OSD::Duration::VERY_LONG, OSD::Color::RED); - instance.CloseGame(); return; } + if (result == RC_NO_GAME_LOADED && instance.m_dll_found) + { + // Allow developer tools for unidentified games + rc_client_set_read_memory_function(instance.m_client, MemoryPeeker); + instance.m_system.store(&Core::System::GetInstance(), std::memory_order_release); + WARN_LOG_FMT(ACHIEVEMENTS, "Unrecognized title ready for development."); + OSD::AddMessage("Unrecognized title loaded for development.", OSD::Duration::VERY_LONG, + OSD::Color::YELLOW); + } if (result != RC_OK) { WARN_LOG_FMT(ACHIEVEMENTS, "Failed to load data for current game."); OSD::AddMessage("Achievements are not supported for this title.", OSD::Duration::VERY_LONG, OSD::Color::RED); - if (instance.m_dll_found && result == RC_NO_GAME_LOADED) - { - // Allow developer tools for unidentified games - rc_client_set_read_memory_function(instance.m_client, MemoryPeeker); - instance.m_system.store(&Core::System::GetInstance(), std::memory_order_release); - return; - } - instance.CloseGame(); return; }