Repository navigation
A raw HID pad GameController only promised takes a player at its first button press: a Keychron Link no longer takes player 1 (#1657) - #1685
Closed
AntoineBRTL wants to merge 1 commit into
Conversation
…t button press: a Keychron Link no longer takes player 1 (seedds#1657) Since PR seedds#859, a device +[GCController supportsHIDDevice:] answers YES for but GameController never lists is read as HID after HIDPAD_GC_WAIT. A keyboard and mouse receiver that declares a GamePad or Joystick collection (Keychron Link, 3434:d030) takes that path, becomes player 1 and pushes the real controller to player 2, so a one-player game such as Ocarina of Time reads nothing. After the wait, such a device now stays in g_hidpads_waiting (idle) and becomes a player only at its first button press (hidpad_value_idle). A receiver sends no buttons, so it never takes a slot; a real pad such as the 8BitDo Ultimate 2C (seedds#965) joins on its first press. An idle device whose GCController connects later goes to GameController (hidpad_gc_connected). Checked: clang -fsyntax-only on pad_hid_mac.h. Not run on hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 7, 2026
seedds
added a commit
that referenced
this pull request
Nov 11, 2026
…oard receiver that declares a gamepad no longer takes player 1: a Keychron Link receiver (3434:d030) declares a Generic Desktop GamePad or Joystick collection, +[GCController supportsHIDDevice:] answers YES for it and GameController never lists it, so since 463d21f it was read as HID after the two-second wait and took the lowest free player at once; the Pro Controller became player 2 and a one-player game (Ocarina of Time) took no input from it. A HID descriptor only claims a controller, and nothing in it tells a receiver that never sends a report through that collection from a pad at rest, so every raw HID pad (hinted by GameController or not) now takes its player at its first button press (hidpad_first_press, front_mac.m), through the path of Press a button to join but with the slot a connecting controller takes (pad_slot_take); the joining press reaches the game. Identical pads read from IOKit (twins) stay players at their connection, and DM_PAD_MERGE is unchanged. The host builds and the host tests and test_docs pass; not run with such a receiver or any raw HID pad, so the issue stays open for the reporter's retest. The controller applet opening in a loop when a one-player game sees two players is a cause of its own (issue #2237). The first-press approach is PR #1685's, rebuilt on the existing join path for every raw HID pad (issue #1657, PR #1685) Co-authored-by: Antoine Bartoli <59134956+AntoineBRTL@users.noreply.github.com>
Owner
|
Thanks for this. The idea here (a player only at the first button press) is what landed, in f20f650, with you credited as co-author. It was rebuilt rather than merged, for three reasons:
Closing in favour of that commit. #1657 stays open until the reporter retests with the receiver. |
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.
Fixes #1657
A raw HID device that GameController says it supports (
supportsHIDDevice:YES) but never lists now takes a player only at its first button press, instead of right afterHIDPAD_GC_WAIT. A keyboard and mouse receiver that declares a GamePad collection (Keychron Link, 3434:d030) sends no buttons, so it no longer takes player 1 from the real controller. A real pad on that path (8BitDo Ultimate 2C, #965) joins on its first press. If its GCController connects meanwhile, it goes to GameController as before.Only
dm/host/pad_hid_mac.hchanges.Testing
clang -fsyntax-onlyon the changed header: OK.scripts/regress.pynot run.