DiscordRPC: Add Rcheevos Icon Support (#3286)

This commit is contained in:
KamFretoZ
2024-09-01 22:02:28 +07:00
committed by Stenzek
parent 51cfea49fe
commit b564f928bd
3 changed files with 10 additions and 0 deletions

View File

@ -5891,6 +5891,8 @@ void System::UpdateRichPresence(bool update_session_time)
const auto lock = Achievements::GetLock();
state_string = StringUtil::Ellipsise(Achievements::GetRichPresenceString(), 128);
rp.state = state_string.c_str();
if (const std::string& icon_url = Achievements::GetGameIconURL(); !icon_url.empty())
rp.largeImageKey = icon_url.c_str();
}
dyn_libs::Discord_UpdatePresence(&rp);