From fbfc305e47423cbbaf15d94506d18f25d3583440 Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 15 Sep 2020 19:56:08 -0700 Subject: [PATCH] Disable DRPC if dedicated --- src/d_main.c | 10 ++++++++-- src/discord.c | 5 +++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 0404dc44..2c02565d 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -732,7 +732,10 @@ void D_SRB2Loop(void) #endif #ifdef HAVE_DISCORDRPC - Discord_RunCallbacks(); + if (! dedicated) + { + Discord_RunCallbacks(); + } #endif } } @@ -1600,7 +1603,10 @@ void D_SRB2Main(void) } #ifdef HAVE_DISCORDRPC - DRPC_Init(); + if (! dedicated) + { + DRPC_Init(); + } #endif } diff --git a/src/discord.c b/src/discord.c index 99cc0a3b..b3798e29 100644 --- a/src/discord.c +++ b/src/discord.c @@ -482,6 +482,11 @@ void DRPC_UpdatePresence(void) DiscordRichPresence discordPresence; memset(&discordPresence, 0, sizeof(discordPresence)); + if (dedicated) + { + return; + } + if (!cv_discordrp.value) { // User doesn't want to show their game information, so update with empty presence.