feat(host/steam): default the gadget Deck on for SteamOS (glass-confirmed)

The virtual Steam Deck is validated glass-to-glass on a Deck: it appears as a
distinct second Steam controller, a held A drives Steam's overlay ("Resume
Game"), and a button press registers in a real game (confirmed in-game).

gadget_preferred() now defaults ON for SteamOS hosts (/etc/os-release ID=steamos
or ID_LIKE), OFF elsewhere where the universal UHID path stays the default;
PUNKTFUNK_STEAM_GADGET=1/0 forces it. A Deck-as-host with a physical Deck never
reaches this path — resolve_gamepad's conflict gate degrades SteamDeck → DualSense
first, so the two-Deck case never happens in production (it was only a test-rig
confound on the dev Deck).

The feature is complete: a virtual Steam Deck that Steam Input recognizes +
promotes, churn-free, with input flowing to games. Workspace clippy/fmt/test
green. Not pushed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-29 16:32:42 +00:00
parent 7ab8acaf55
commit 963c406f33
4 changed files with 39 additions and 11 deletions
+12
View File
@@ -822,3 +822,15 @@ confirms our state reports (pressed button at byte 8) are delivered on the inter
by hid-steam — so with M1/M2's byte-8→BTN_SOUTH decode, the input chain is proven end-to-end. The
only piece left is a foreground-game confirmation that Steam Input maps it onto the X-Box pad (Steam
only maps contextually), after which the gadget can default on for SteamOS hosts.
### Glass confirmed + default-on for SteamOS (2026-06-29)
Validated glass-to-glass on the Deck: the gadget shows up as a distinct second Steam controller, a
held A snaps the Steam overlay shut as "Resume Game" (so Steam Input receives + acts on the gadget's
input), and **a button press registers in a real game** — confirmed in-game. The two-Deck test
confound (the Deck has its physical Deck + the virtual one) is a test-rig artifact, not a feature
limit: a real non-Deck SteamOS host has only the virtual Deck, and a Deck-as-host degrades `SteamDeck`
→ DualSense via the M6 conflict gate before the gadget is ever built. So `gadget_preferred()` now
defaults **on for SteamOS** (`/etc/os-release` `ID=steamos`), off elsewhere (UHID stays default),
with `PUNKTFUNK_STEAM_GADGET=1`/`0` to force. The virtual Steam Deck — recognized + promoted by Steam
Input, churn-free, input flowing to games — is complete.