Skip to content

feat: add controller player slot assignment for local co-op#938

Open
Aburc00 wants to merge 1 commit into
redphx:typescriptfrom
Aburc00:claude/add-local-coop-controllers-qJdNw
Open

feat: add controller player slot assignment for local co-op#938
Aburc00 wants to merge 1 commit into
redphx:typescriptfrom
Aburc00:claude/add-local-coop-controllers-qJdNw

Conversation

@Aburc00
Copy link
Copy Markdown

@Aburc00 Aburc00 commented May 1, 2026

Allows users to assign each connected controller (Xbox, PS5, etc.) to a specific player slot (1-4) independently of browser-assigned gamepad index. When local co-op is enabled, the XCloud patch uses the user-defined mapping so e.g. an Xbox controller can be P1 and a PS5 DualSense can be P2 reliably.

  • ControllerSetting type gains a playerIndex field (-1 = auto, 0-3 = fixed)
  • StreamSettings tracks a gamepadSlots map (browserIndex -> playerSlot)
  • BxExposed exposes getGamepadPlayerSlot() for the runtime patch
  • local-co-op-enable.ts routes both onGamepadChanged and onGamepadInput through getGamepadPlayerSlot() instead of using raw browser indices
  • Controller settings UI shows a "Player slot (co-op)" dropdown that appears only when Local Co-Op is enabled
  • Gamepad connect toast shows the assigned slot number (P1/P2/P3/P4)

https://claude.ai/code/session_01CQckfGUJHunV7zUygAEhH3

Allows users to assign each connected controller (Xbox, PS5, etc.) to a
specific player slot (1-4) independently of browser-assigned gamepad index.
When local co-op is enabled, the XCloud patch uses the user-defined mapping
so e.g. an Xbox controller can be P1 and a PS5 DualSense can be P2 reliably.

- ControllerSetting type gains a playerIndex field (-1 = auto, 0-3 = fixed)
- StreamSettings tracks a gamepadSlots map (browserIndex -> playerSlot)
- BxExposed exposes getGamepadPlayerSlot() for the runtime patch
- local-co-op-enable.ts routes both onGamepadChanged and onGamepadInput
  through getGamepadPlayerSlot() instead of using raw browser indices
- Controller settings UI shows a "Player slot (co-op)" dropdown that
  appears only when Local Co-Op is enabled
- Gamepad connect toast shows the assigned slot number (P1/P2/P3/P4)

https://claude.ai/code/session_01CQckfGUJHunV7zUygAEhH3
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.

2 participants