#6

Pass a library profile's extra launch arguments to LaunchApp

OpenDeathKhanwants to merge intofrom

Steam's IClientAppManager LaunchApp call already takes a user-arguments string (pszUserArgs); Dock always passed "". Read MADEIRA_STEAM_HOST_ARGUMENTS and pass it on the first request and on every update retry, alongside the unchanged original launch-option key. Steam appends it to the game's configured launch option, as the desktop client does for per-game launch options.

The value is bounded UTF-8: unbalanced quotes, control characters, more than 64 tokens or 4095 bytes fail the launch (result 50, launch-user-arguments-invalid) rather than launching with different arguments. Only its byte count is logged (launch-user-arguments-bytes), since arguments can carry tokens. An unset variable keeps today's "".

tests/test-validation.c covers the validator and passes on the host. On iPhone, a Godot game launched through Dock with --rendering-driver opengl3 logged launch-user-arguments-bytes=26 and started on the requested OpenGL renderer. Needs the app to export the variable (companion Madeira PR).


Dependency: the app side is willfaust/Madeira#366, which exports MADEIRA_STEAM_HOST_ARGUMENTS.