File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -523,6 +523,11 @@ const std::string& Achievements::GetGameIconPath()
523523 return s_game_icon;
524524}
525525
526+ const std::string& Achievements::GetGameIconURL ()
527+ {
528+ return s_game_icon_url;
529+ }
530+
526531const std::string& Achievements::GetRichPresenceString ()
527532{
528533 return s_rich_presence_string;
Original file line number Diff line number Diff line change @@ -115,6 +115,9 @@ bool HasRichPresence();
115115// / Should be called with the lock held.
116116const std::string& GetRichPresenceString ();
117117
118+ // / Returns the URL for the current icon of the game
119+ const std::string& GetGameIconURL ();
120+
118121// / Returns the RetroAchievements title for the current game.
119122// / Should be called with the lock held.
120123const std::string& GetGameTitle ();
Original file line number Diff line number Diff line change @@ -5892,6 +5892,8 @@ void System::UpdateRichPresence(bool update_session_time)
58925892 const auto lock = Achievements::GetLock ();
58935893 state_string = StringUtil::Ellipsise (Achievements::GetRichPresenceString (), 128 );
58945894 rp.state = state_string.c_str ();
5895+ if (const std::string& icon_url = Achievements::GetGameIconURL (); !icon_url.empty ())
5896+ rp.largeImageKey = icon_url.c_str ();
58955897 }
58965898
58975899 dyn_libs::Discord_UpdatePresence (&rp);
You can’t perform that action at this time.
0 commit comments