From 75d444b1d5689082b62f7ab38ac2380551117e56 Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Mon, 22 Jan 2024 16:25:29 +0100 Subject: [PATCH] disable osu integrated rpc when launcher has active rpc --- electron/richPresence.js | 1 + main.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/electron/richPresence.js b/electron/richPresence.js index 40d35ed..4489d34 100644 --- a/electron/richPresence.js +++ b/electron/richPresence.js @@ -60,4 +60,5 @@ module.exports = { richPresence.setActivity(currentStatus); } }, + hasPresence: () => richPresence != undefined, }; diff --git a/main.js b/main.js index 47ef2f4..d05f977 100644 --- a/main.js +++ b/main.js @@ -486,6 +486,9 @@ function registerIPCPipes() { const userConfig = getUserConfig(osuPath); richPresence.updateVersion(await userConfig.get("LastVersion")); richPresence.update(); + if (richPresence.hasPresence) { + await userConfig.set("DiscordRichPresence", "0"); + } await userConfig.set("ShowInterfaceDuringRelax", "1"); if (currentUser) { await userConfig.set("CredentialEndpoint", "ez-pp.farm");