Files
NX2navi/runtime/discord_app.h
chrg6 8f559ac945 Show the Discord status under an NX2navi application instead of the old one
Discord takes the name above the presence from the application whose id the client sends, and the built-in id
belonged to the application the earlier framework registered for its own game, so the status read as that game.
The id and the art key now live in runtime/discord_app.h (NX2NAVI_DISCORD_APP_ID_DEFAULT and
NX2NAVI_DISCORD_IMAGE_DEFAULT), the one place to paste the NX2navi application's id. Until it is set there or in
nx2navi.ini, the presence stays off and logs once how to set it, and --probe-discord skips. The ini example and the
comments no longer claim the old id is registered as NX2navi, and the details-line example uses game 1.1.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 01:25:12 -05:00

16 lines
1.2 KiB
C

// The Discord application NX2navi's Rich Presence (discord_rpc.c) speaks for: the one place its defaults live.
//
// Discord shows the *application's* name above the presence ("Playing <name>") and takes the large image from the
// art assets uploaded to that application; neither comes from the game. So the presence needs an application of its
// own, registered at discord.com/developers/applications under the name NX2navi, with its art uploaded under
// Rich Presence > Art Assets with the key below. Its Application ID (General Information) goes into
// NX2NAVI_DISCORD_APP_ID_DEFAULT; a player can still point at another application with discord_app_id and
// discord_image in nx2navi.ini ([discord]), which take precedence over these defaults.
//
// While the id is empty and nx2navi.ini names none, the presence stays off even with discord_rpc = 1 and logs why:
// an id of some other application would show that application's name instead of NX2navi.
#pragma once
#define NX2NAVI_DISCORD_APP_ID_DEFAULT "" // the NX2navi application's id: digits only, at most 20
#define NX2NAVI_DISCORD_IMAGE_DEFAULT "nx2navi_512x512" // its large-image art asset key