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:
@@ -384,8 +384,8 @@ impl SteamControllerManager {
|
||||
if idx >= MAX_PADS || self.pads[idx].is_some() || self.broken {
|
||||
return;
|
||||
}
|
||||
// Prefer the USB gadget on SteamOS (the only transport Steam Input promotes); fall back to the
|
||||
// universal UHID pad if the gadget is unavailable or not opted in.
|
||||
// Prefer the USB gadget on SteamOS (default there — the only transport Steam Input promotes);
|
||||
// fall back to the universal UHID pad if the gadget is unavailable or disabled.
|
||||
let opened = if crate::inject::steam_gadget::gadget_preferred() {
|
||||
crate::inject::steam_gadget::ensure_modules();
|
||||
match crate::inject::steam_gadget::SteamDeckGadget::open(idx as u8) {
|
||||
|
||||
Reference in New Issue
Block a user