Skip to content

feat(host): expose launch command line and URL/rich-presence join events - #9

Merged
hzqst merged 1 commit into
mainfrom
feat/host-launch-parameters
Nov 24, 2026
Merged

hzqst merged 1 commit into
mainfrom
feat/host-launch-parameters

Conversation

@hzqst

@hzqst hzqst commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add SteamBridge_UserGetLaunchCommandLine(char* commandLine, uint32_t capacity, uint32_t* bytes) to host mode (ISteamApps::GetLaunchCommandLine), supporting both two-step size probing (NULL, 0) and bounded copies with guaranteed NUL termination.
  • Register and forward two new client callbacks on SteamBridgeClientEvent:
    • SB_CLIENT_NEW_URL_LAUNCH_PARAMETERS (NewUrlLaunchParameters_t, allowing a NULL payload since the Steam callback struct has no fields).
    • SB_CLIENT_RICH_PRESENCE_JOIN (GameRichPresenceJoinRequested_t, copying friendSteamID and connect[SB_CLIENT_CONNECT_BYTES] with SB_CLIENT_CONNECT_BYTES = 256).
  • Extend tests/MockHost.cpp and tests/Host.cpp to cover launch command-line querying (unavailable, empty, size probing, full read, truncation, invalid arguments) and both new client callbacks, and update README.md.

Verification

  • Windows x64 Release: SteamBridge.Unavailable, SteamBridge.Host, SteamBridge.Modern — 3/3 passed.
  • Windows x86 Release: SteamBridge.Unavailable, SteamBridge.Host, SteamBridge.Modern, SteamBridge.Legacy — 4/4 passed.
  • Linux x64 Release (WSL Ubuntu 24.04): SteamBridge.Unavailable, SteamBridge.Host — 2/2 passed.
  • Linux x86 Release (WSL Ubuntu 24.04): SteamBridge.Unavailable, SteamBridge.Host — 2/2 passed.
  • format-check: 14 files, 0 differences.

@hzqst
hzqst merged commit ba5b212 into main Nov 24, 2026
2 checks passed
@hzqst
hzqst deleted the feat/host-launch-parameters branch November 24, 2026 13:30
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