Repository navigation
feat: detect the active controller family (Xbox, PlayStation, Nintendo, generic) - #111
Merged
Merged
Conversation
Resolve Xbox/PlayStation/Nintendo/Generic from the SDL gamepad type and vendor ID, publish it from InputHost to AppController, and let another controller take over with a new press while the active one is idle. Label style gains "Automatic" (new default; v1 settings that only had the old Generic default migrate to it); manual styles still override. Co-Authored-By: Claude Opus 5.5 <[email protected]>
nextestudios
force-pushed
the
feature/32-controller-family
branch
from
September 27, 2026 02:40
c5dda6a to
9d810e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ControllerFamily(Core) +ControllerFamilies.Detect(isGamepad, sdlType, vendorId): SDL gamepad type first (xbox360/xboxone,ps3/ps4/ps5,switchpro/joycon*/gamecube), then vendor ID (Microsoft/Sony/Nintendo) when SDL reportsstandard/unknown; joysticks without a gamepad profile are Generic. No device-name matching.InputDeviceInfo.Familyis set bySdl3InputBackend;InputHostpublishes the active family toAppController.SetActiveControlleron everyActiveDeviceChanged.InputRouternow lets another device take over with a new press when the active one isn't holding anything (and never while a sensitive modal is open). This avoids two pads fighting and double actions from a physical+virtual pair.ButtonLabelStyle.Automatic(new default) follows the active family; Generic/Xbox/PlayStation/Nintendo still pin a style from the menu. Settings schema v2: v1 files whoseLabelStylewas the oldGenericdefault migrate to Automatic; explicit choices stay.AppController.PromptFamily(vector glyphs and the prompt provider come in feat: create original vector button glyphs for Xbox, PlayStation, Nintendo and generic layouts #33/feat: add dynamic controller button prompts to action bar #34).Tests
Closes #32
🤖 Generated with Claude Code