mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 01:49:59 -04:00
Follow the gamepad the player presses and show the project's name.
Every connected gamepad is kept open and rescanned each second, and the game reads the one pressed last: taking only the first one SDL listed left the game deaf when that was a virtual or idle device. SDL may deliver gamepad presses in the background, since it cannot see the Win32 window's focus; the keyboard stays gated on it. The log notes each gamepad's first press. The version line, the window title and the Discord status say the project's name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -170,7 +170,7 @@ static int send_activity(PlatIpc *p, const char *image) {
|
||||
snprintf(json, sizeof json,
|
||||
"{\"cmd\":\"SET_ACTIVITY\",\"nonce\":\"%u\",\"args\":{\"pid\":%lu,\"activity\":{\"details\":\"Game "
|
||||
"%d.%d.%d \\u00b7 Recomp %.*s\",\"timestamps\":{\"start\":%llu},\"assets\":{\"large_image\":\"%s\","
|
||||
"\"large_text\":\"NX2navi %s\"}}}}",
|
||||
"\"large_text\":\"Ocarina Recomp %s\"}}}}",
|
||||
next_nonce(), (unsigned long)plat_process_id(), v / 100, v / 10 % 10, v % 10, port_len, rt_port_version,
|
||||
(unsigned long long)start, image, rt_port_version);
|
||||
if (!write_frame(p, OP_FRAME, json)) return 0;
|
||||
|
||||
Reference in New Issue
Block a user