Files
jpolo1224 bc951c84dd Android: run the Discord SDK out of process, and finish the friends UI
ARMSX2 is GPL-3.0+ and the Discord Social SDK is proprietary. Linking them into
one binary would make the emulator a combined work with a library whose
corresponding source cannot be supplied, so the SDK now runs as a separate
program in its own process and the two talk over a deliberately dumb message
interface: a title, a serial, an image URL, a list of names. No emulator type
crosses that line.

libemucore has no DT_NEEDED on the SDK and never loads it; the bridge builds
into its own libarmsx2_discord.so, loaded only in :discord. With the feature
switched off that process does not exist and the library is never mapped at all.
Verify with: llvm-readelf -d libemucore_4k.so | grep -i discord  (must be empty)

The SDK itself is no longer in this repository. Discord's terms permit shipping
it inside a working application but not republishing the raw SDK, so it is an
optional private build input via DISCORD_SDK_DIR. Unset -- every public clone --
the feature compiles out and the UI reports itself unavailable. Deliberately not
a product flavour: one release variant, and the only difference is whether that
directory was present at build time.

Also here, from testing the feature into shape:

- Presence uses the game's own cover art, and our logo (an Art Asset key, not a
  repo URL, so it tracks the current mark) when idle.
- Friends show their avatar AND the cover of what they are playing, never one
  instead of the other -- swapping the face out for box art loses the identity
  exactly when the row gets interesting.
- A count badge on the Friends entry point, in the drawer and in the in-game
  header, because the point of it is to be seen by someone not looking at the
  friends list.
- Friends moved off the in-game tab rail into a header button with its own
  panel. It was last on a rail that scrolls, so reaching it meant knowing it was
  there. The panel is composed, not a Dialog: a Dialog takes its own focused
  window and swallows gamepad keys before our input plumbing sees them.
- "<friend> is now online" is one Compose banner at the Activity root, replacing
  a split between an emulator OSD message in game and nothing at all in the
  library. The OSD is text-only and could never show an avatar.
- Reconnect after a drop, with backoff. The SDK does not retry and its
  connection does not survive being backgrounded, so a drop used to be terminal
  until the app was restarted.
2026-07-28 01:38:34 -04:00
..