pod: fully explicit activation (--profile) + RIOJoy.Tray.Ready signal
No detection anywhere in the pod chain (Cyd: foreground detection is too slow - the pad appears after the game already enumerated controllers). --profile <name> activates immediately at startup, never runs the auto-switch watcher, and on success signals the named manual-reset event RIOJoy.Tray.Ready (process-lifetime, never stale) so a launcher waits on the signal instead of counting winmm devices. Legible failures for the launcher: exit 4 unknown profile, exit 5 activation failed with the reason on stderr - both verified live against the built exe. Editor close re-activates the explicit profile. build-pod start scripts now pass --profile <Name> --exit-with <exe>; docs updated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -503,6 +503,18 @@ total across the suite.
|
||||
exe wins over `%APPDATA%\RIOJoy\config.json`; `TrayApplicationContext.
|
||||
ConfigPath` resolves through it, so `--import-profile` targets the same
|
||||
store. A pod bundle needs no import step: its config *is* the profile.
|
||||
- **`--profile <name>`** — explicit immediate activation, **no detection**:
|
||||
in pod mode the auto-switch watcher never runs. The rationale is
|
||||
enumeration timing: games enumerate controllers at startup, and foreground
|
||||
detection activates ~1 s after the window appears — too late, so the pod
|
||||
launch script activates the profile *before* starting the game and the
|
||||
ViGEm pad already exists when the game looks. On success RIOJoy signals the
|
||||
named event `RIOJoy.Tray.Ready` (process-lifetime — never stale) so a pod
|
||||
launcher waits on the signal instead of counting input devices. Exit code 4
|
||||
for an unknown profile name (validated up front so a pod-script typo is
|
||||
scriptable, not a silently idle tray) and 5 for failed activation (reason
|
||||
on stderr) — the launcher can always tell "failed with reason" from
|
||||
"hung". Closing the editor re-activates the explicit profile.
|
||||
- **`--exit-with <exe|pid>`** (`CompanionTarget.Parse` — pid, or a name
|
||||
normalized like auto-switch triggers): the tray polls the companion on its
|
||||
existing 1 s timer and quits through the normal teardown (ports released,
|
||||
|
||||
Reference in New Issue
Block a user