Skip to content

Add Dynamic Discord RPC Support - #1791

Open
zydezu wants to merge 4 commits into
hedge-dev:mainfrom
zydezu:main
Open

Add Dynamic Discord RPC Support#1791
zydezu wants to merge 4 commits into
hedge-dev:mainfrom
zydezu:main

Conversation

@zydezu

@zydezu zydezu commented Sep 10, 2026

Copy link
Copy Markdown

Optional Discord status showing the current stage, whether you're playing as Sonic or the Werehog, and elapsed time. Controlled by a new [System] DiscordRichPresence option (on by default, toggleable at runtime).

image image
  • Talks to the local discord-ipc socket directly — no SDK or new dependency (reuses the vendored nlohmann/json). Works on Windows, Linux and macOS, including Flatpak/Snap Discord.
  • Runs on its own worker thread with reconnect/backoff, so a closed or missing Discord never touches the game loop. Presence is throttled and only resent when it changes.
  • Stage and status text goes through Localise(); keys are in locale.cpp, English-only for now with the normal fallback until translated.
  • large_image/small_image map to per-region and Sonic/Werehog art-asset keys, left empty (app icon) when no matching asset is uploaded.
  • Flatpak manifest gains --filesystem=xdg-run/discord-ipc-0 for socket access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant