Skip to content

fix(Manager): keep devices in gamepad order during target device changes - #642

Open
strycore wants to merge 1 commit into
ShadowBlip:mainfrom
lutris:fix-gamepad-order-race
Open

fix(Manager): keep devices in gamepad order during target device changes#642
strycore wants to merge 1 commit into
ShadowBlip:mainfrom
lutris:fix-gamepad-order-race

Conversation

@strycore

@strycore strycore commented Aug 6, 2026

Copy link
Copy Markdown

When a composite device switches profiles, its target devices are stopped and re-attached. The RemoveFromGamepadOrder request is sent from a spawned task after the suspended state check, so it can arrive after a new gamepad target has already been attached. When that happens the device is dropped from the gamepad order even though it still has a gamepad target, and it is never re-added until the next gamepad attach. On systems where the session manager reloads profiles several times at boot this reliably left GamepadOrder empty with a controller connected and working.

Only remove a device from the gamepad order if it no longer has any gamepad target attached.

When a composite device switches profiles, its target devices are
stopped and re-attached. The RemoveFromGamepadOrder request is sent
from a spawned task after the suspended state check, so it can arrive
after a new gamepad target has already been attached. When that
happens the device is dropped from the gamepad order even though it
still has a gamepad target, and it is never re-added until the next
gamepad attach. On systems where the session manager reloads profiles
several times at boot this reliably left GamepadOrder empty with a
controller connected and working.

Only remove a device from the gamepad order if it no longer has any
gamepad target attached.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant