Send Rich Presence to Discord

If Rich Presence and Discord Presence are enabled in Achievement Settings, the string generated by rcheevos as the player's current Rich Presence will be sent to the Status field in the Discord Presence object. This will be updated whenever Rich Presence updates.
This commit is contained in:
LillyJadeKatrin committed 2024-05-08 00:33:33 -04:00
1 parent 5768d82662
commit 57c8ea12ed
3 files changed
+34 -5

No files matched your search

+3
View File
@@ -22,6 +22,7 @@
#include "Core/PowerPC/MMU.h"
#include "Core/System.h"
#include "DiscIO/Blob.h"
#include "UICommon/DiscordPresence.h"
#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/VideoEvents.h"
@@ -227,6 +228,8 @@ void AchievementManager::DoFrame()
m_last_rp_time = current_time;
rc_client_get_rich_presence_message(m_client, m_rich_presence.data(), RP_SIZE);
m_update_callback(UpdatedItems{.rich_presence = true});
if (Config::Get(Config::RA_DISCORD_PRESENCE_ENABLED))
Discord::UpdateDiscordPresence();
}
}