From c55624702cfd807b3a18e3ee3c04d5a99f42fcdd Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Wed, 16 Apr 2025 23:59:16 -0400 Subject: [PATCH] Allow RA Dev Tools for Unidentified Games Due to requests from RA Devs, updating the AchievementManager LoadGameCallback to still set MemoryPeeker (and set m_system) if the load game response is NO_GAME_LOADED, so that the memory inspector et al continue function properly on unidentified hashes. Without this, no memory is loaded and the memory inspector will show all zeroes. --- Source/Core/Core/AchievementManager.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/AchievementManager.cpp b/Source/Core/Core/AchievementManager.cpp index f13486ccd2..01ed2b91a2 100644 --- a/Source/Core/Core/AchievementManager.cpp +++ b/Source/Core/Core/AchievementManager.cpp @@ -972,7 +972,8 @@ void AchievementManager::LeaderboardEntriesCallback(int result, const char* erro void AchievementManager::LoadGameCallback(int result, const char* error_message, rc_client_t* client, void* userdata) { - AchievementManager::GetInstance().m_loading_volume.reset(nullptr); + auto& instance = AchievementManager::GetInstance(); + instance.m_loading_volume.reset(nullptr); if (result == RC_API_FAILURE) { WARN_LOG_FMT(ACHIEVEMENTS, "Load data request rejected for old Dolphin version."); @@ -987,6 +988,12 @@ void AchievementManager::LoadGameCallback(int result, const char* error_message, 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; } @@ -1000,7 +1007,6 @@ void AchievementManager::LoadGameCallback(int result, const char* error_message, } INFO_LOG_FMT(ACHIEVEMENTS, "Loaded data for game ID {}.", game->id); - auto& instance = AchievementManager::GetInstance(); rc_client_set_read_memory_function(instance.m_client, MemoryPeeker); instance.m_display_welcome_message = true; instance.FetchGameBadges();