mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-17 11:34:18 +01:00
DiscordRPC: Further improve icon url call
This commit is contained in:
1 parent
4565a62634
commit
110426ac9f
3 files changed
+31
-31
No files matched your search
+8
-6
@@ -3633,15 +3633,17 @@ void VMManager::UpdateDiscordPresence(bool update_session_time)
|
||||
|
||||
std::string state_string;
|
||||
|
||||
auto lock = Achievements::GetLock();
|
||||
|
||||
if (Achievements::HasRichPresence())
|
||||
{
|
||||
auto lock = Achievements::GetLock();
|
||||
rp.state = (state_string = StringUtil::Ellipsise(Achievements::GetRichPresenceString(), 128)).c_str();
|
||||
|
||||
state_string = StringUtil::Ellipsise(Achievements::GetRichPresenceString(), 128);
|
||||
rp.state = state_string.c_str();
|
||||
|
||||
rp.largeImageKey = Achievements::GetGameIconURL().c_str();
|
||||
rp.largeImageText = s_title.c_str();
|
||||
if (const std::string& icon_url = Achievements::GetGameIconURL(); !icon_url.empty())
|
||||
{
|
||||
rp.largeImageKey = icon_url.c_str();
|
||||
rp.largeImageText = s_title.c_str();
|
||||
}
|
||||
}
|
||||
|
||||
Discord_UpdatePresence(&rp);
|
||||
|
||||
Reference in new issue
Block a user