mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge pull request #12812 from LillyJadeKatrin/retroachievements-close-fixes
Properly reset Discord presence after game close
This commit is contained in:
commit
2b386cdcdc
@ -403,17 +403,20 @@ void AchievementManager::CloseGame()
|
|||||||
m_unlocked_badges.clear();
|
m_unlocked_badges.clear();
|
||||||
m_locked_badges.clear();
|
m_locked_badges.clear();
|
||||||
m_leaderboard_map.clear();
|
m_leaderboard_map.clear();
|
||||||
|
m_rich_presence.fill('\0');
|
||||||
rc_api_destroy_fetch_game_data_response(&m_game_data);
|
rc_api_destroy_fetch_game_data_response(&m_game_data);
|
||||||
m_game_data = {};
|
m_game_data = {};
|
||||||
m_queue.Cancel();
|
m_queue.Cancel();
|
||||||
m_image_queue.Cancel();
|
m_image_queue.Cancel();
|
||||||
rc_client_unload_game(m_client);
|
rc_client_unload_game(m_client);
|
||||||
m_system = nullptr;
|
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});
|
m_update_callback(UpdatedItems{.all = true});
|
||||||
INFO_LOG_FMT(ACHIEVEMENTS, "Game closed.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AchievementManager::Logout()
|
void AchievementManager::Logout()
|
||||||
|
Loading…
Reference in New Issue
Block a user