mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Added INI setting for Discord Rich Presence
This commit is contained in:
@ -18,6 +18,9 @@ namespace Discord
|
||||
void Init()
|
||||
{
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
if (!SConfig::GetInstance().bUseDiscordPresence)
|
||||
return;
|
||||
|
||||
DiscordEventHandlers handlers = {};
|
||||
// The number is the client ID for Dolphin, it's used for images and the appication name
|
||||
Discord_Initialize("450033159212630028", &handlers, 1, nullptr);
|
||||
@ -28,6 +31,9 @@ void Init()
|
||||
void UpdateDiscordPresence()
|
||||
{
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
if (!SConfig::GetInstance().bUseDiscordPresence)
|
||||
return;
|
||||
|
||||
const std::string& title = SConfig::GetInstance().GetTitleDescription();
|
||||
|
||||
DiscordRichPresence discord_presence = {};
|
||||
@ -42,6 +48,9 @@ void UpdateDiscordPresence()
|
||||
void Shutdown()
|
||||
{
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
if (!SConfig::GetInstance().bUseDiscordPresence)
|
||||
return;
|
||||
|
||||
Discord_Shutdown();
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user