fix(prompts): auto picks the steam deck face for a steam controller #2448

Merged
dylmart merged 2 commits from fix/steam-controller-prompts into main 2026-11-11 20:15:15 +00:00
dylmart commented 2026-11-11 19:34:22 +00:00 (Migrated from github.com)

auto matched "steam deck" only, so a steam controller (sdl3 names it "Steam Controller") fell through to the xbox face. its buttons are named as the deck's, so it gets the deck's face now. under steam, steam input's stand-in pad for a steam controller has the same name, so it gets the deck's face too. a pad named "Steam Virtual Gamepad" stays on the xbox face.

Tested on a 2026 Steam Controller (wireless puck) on Linux (CachyOS, SDL 3.4): the game's log shows prompts: auto: controller "Steam Controller": steamdeck, run from Steam. python -I -B tests/test_prompt_auto_face.py passes.

auto matched "steam deck" only, so a steam controller (sdl3 names it "Steam Controller") fell through to the xbox face. its buttons are named as the deck's, so it gets the deck's face now. under steam, steam input's stand-in pad for a steam controller has the same name, so it gets the deck's face too. a pad named "Steam Virtual Gamepad" stays on the xbox face. Tested on a 2026 Steam Controller (wireless puck) on Linux (CachyOS, SDL 3.4): the game's log shows `prompts: auto: controller "Steam Controller": steamdeck`, run from Steam. `python -I -B tests/test_prompt_auto_face.py` passes.
Joey-Magnus (Migrated from github.com) approved these changes 2026-11-11 20:08:56 +00:00
Joey-Magnus (Migrated from github.com) left a comment

Looks good. face_of_name (host/prompts.c:83) now matches "steam controller" next to "steam deck". contains ignores case, so SDL's "Steam Controller" gets the Deck's face. "Steam Virtual Gamepad" still falls through to the Xbox face, which is right because any pad can be behind it. Both callers, choose_face at the start and live_face for the menu's live row, go through face_of_name, so both get the fix.

The new tests/test_prompt_auto_face.py cuts contains and face_of_name out of the source and compiles them, as the other prompt checks do. It covers the new name, the Deck's names, the virtual pad and the other vendors. I ran it locally at the PR's head and it passes. So far only the title check has run on this PR. The source checks still need a maintainer to approve the workflow run, but nothing here should change their result.

Looks good. `face_of_name` (`host/prompts.c:83`) now matches "steam controller" next to "steam deck". `contains` ignores case, so SDL's "Steam Controller" gets the Deck's face. "Steam Virtual Gamepad" still falls through to the Xbox face, which is right because any pad can be behind it. Both callers, `choose_face` at the start and `live_face` for the menu's live row, go through `face_of_name`, so both get the fix. The new `tests/test_prompt_auto_face.py` cuts `contains` and `face_of_name` out of the source and compiles them, as the other prompt checks do. It covers the new name, the Deck's names, the virtual pad and the other vendors. I ran it locally at the PR's head and it passes. So far only the title check has run on this PR. The source checks still need a maintainer to approve the workflow run, but nothing here should change their result.
Commenting is not possible because the repository is archived.
No description provided.