From 88176bccc6a20aae1167a2dc92f927efabebb174 Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Mon, 31 Aug 2026 22:46:21 +0200 Subject: [PATCH] Pass exact WoW PID to Discord companion --- native/DiscordPresence/DiscordPresence.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/native/DiscordPresence/DiscordPresence.c b/native/DiscordPresence/DiscordPresence.c index 7b3cdf1..6321b4a 100644 --- a/native/DiscordPresence/DiscordPresence.c +++ b/native/DiscordPresence/DiscordPresence.c @@ -373,7 +373,12 @@ static int start_discord_companion(void) { attrs = GetFileAttributesA(exe); if (attrs == INVALID_FILE_ATTRIBUTES || (attrs & FILE_ATTRIBUTE_DIRECTORY)) return 0; - _snprintf(command, sizeof(command), "\"%s\"", exe); + _snprintf( + command, + sizeof(command), + "\"%s\" --pid %lu", + exe, + (unsigned long)GetCurrentProcessId()); command[sizeof(command) - 1] = 0; memset(&si, 0, sizeof(si));