Fix several joystick issues - #2820
Draft
rafaellehmkuhl wants to merge 10 commits into
Draft
Conversation
Xbox controllers connected through XInput on Windows are exposed by the browser without VID/PID (e.g. "Xbox 360 Controller (XInput STANDARD GAMEPAD)"), so they resolved to the generic Unknown model. Match them by name to a dedicated XboxController_XInput model with the standard gamepad layout.
…oins When a second joystick connected while forwarding was already active, the handler returned early, skipping the main-joystick selection and the disconnected-joystick cleanup for the rest of the event. Use `continue` so only the redundant conflict check is skipped and the handler still finishes.
Cockpit forwards input from every connected joystick into a single shared manual-control state, so multiple controllers fight each other. When more than one joystick is connected and none is disabled yet, open a dialog asking the user which one to keep and disable the others through the existing per-model disabling mechanism. Guard against re-opening while the dialog is already shown.
When a single joystick is connected but its model is in the disabled list, its input is silently dropped and there is no visible hint about why. Show a persistent snackbar pointing the user to the joystick configuration page to re-enable it, and dismiss it automatically once the condition clears.
…bled checkForOtherManualControlSources awaited plain fetches with no timeout, so a reachable-but-unresponsive BlueOS could keep joystick forwarding disabled indefinitely while the connection handler waited. Bound each request with a 2s AbortSignal timeout; on timeout it is handled like any other failure and falls through to enabling forwarding.
The blue text was hard to read against many backgrounds. Use white to match the standard button styling.
The table's live preview followed the first connected joystick regardless of its enabled state, so with the first joystick disabled the table showed a frozen (state-dropped) device and never reacted to the enabled one. Pick an enabled joystick, and re-pick when the current selection is disconnected or disabled.
Order the visual tab's joystick list so enabled devices appear above disabled ones, keeping the active joystick at the top.
Xbox controllers exposed through SDL on Windows report VID 045e / PID 02ff (the generic XInput interface), which was missing from the database and so resolved to Unknown. Map it to the XInput Xbox model, matching how the same controller is recognized by name in the browser build.
rafaellehmkuhl
force-pushed
the
fix-joystick-issues
branch
from
July 3, 2026 13:29
ddc85d6 to
c9019aa
Compare
1 task
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.
No description provided.