Steam Input motion: buttons move to Steam's virtual gamepad once it is up, a controller Steam hid keeps its own bias as the pad, and a sensor SDL could not turn on is logged with SDL's error (#1282)

1. scan_pads took a controller Steam hid when the virtual pad was not up yet and kept it for the session, so Steam's
   remapping was lost. While the open pad is a hidden one, pad_physical looks again every RESCAN_MS and scan_pads
   moves the buttons to the virtual pad; the hidden controller stays open as motion_extra, so motion goes on with
   the same bias and orientation.
2. pad_identity marked " (under Steam)" only on motion_extra; a hidden controller that became the pad lost the mark
   and could take the bias calibrated with Steam closed. The mark now follows steam_hidden_id.
3. After pull request #1024: sensors_ready logs SDL_GetError when the pad has both sensors but enabling them failed,
   instead of "has no gyro and accelerometer".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-11-18 09:08:52 +03:00
1 parent 2dbdcf9a37
commit 96a809044d
2 files changed
+37 -10

No files matched your search

+3 -1
View File
@@ -255,7 +255,9 @@ pad, so Steam's remapping applies and nothing is read twice, and when the virtua
opens the real controller behind it for its gyro and accelerometer only (`motion_source`). The log then shows
`input: motion from "<name>" (<vendor>:<product>), the controller behind Steam Input's virtual gamepad`. This covers the
Steam Controller and the Steam Deck's built-in controls, which Steam Input cannot be turned off for, and other
controllers Steam Input wraps. With `motion = 0` at start Steam's list stays in force.
controllers Steam Input wraps. A controller Steam hid serves for buttons only while no other gamepad is there (Steam's
virtual pad can come up after the game starts); once the virtual pad is up the buttons move to it. With `motion = 0`
at start Steam's list stays in force.
Steam switches the controller's gyro off while the game's layout binds nothing to it: the reports keep coming with the
gyro at zero, and the game's request for it (SDL renews it every 3 s) does not win. The layout needs a gyro binding,