From 8e33a5778e26e99d30b7f5223937527a67066636 Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Mon, 27 May 2024 17:52:13 -0400 Subject: [PATCH] Properly reset Discord presence after game close Also fixed an Achievement log that was reporting even when achievements were disabled. --- Source/Core/Core/AchievementManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/AchievementManager.cpp b/Source/Core/Core/AchievementManager.cpp index 360a332eb0..b5d58f9c4f 100644 --- a/Source/Core/Core/AchievementManager.cpp +++ b/Source/Core/Core/AchievementManager.cpp @@ -403,17 +403,20 @@ void AchievementManager::CloseGame() m_unlocked_badges.clear(); m_locked_badges.clear(); m_leaderboard_map.clear(); + m_rich_presence.fill('\0'); rc_api_destroy_fetch_game_data_response(&m_game_data); m_game_data = {}; m_queue.Cancel(); m_image_queue.Cancel(); rc_client_unload_game(m_client); m_system = nullptr; + if (Config::Get(Config::RA_DISCORD_PRESENCE_ENABLED)) + Discord::UpdateDiscordPresence(); + INFO_LOG_FMT(ACHIEVEMENTS, "Game closed."); } } m_update_callback(UpdatedItems{.all = true}); - INFO_LOG_FMT(ACHIEVEMENTS, "Game closed."); } void AchievementManager::Logout()