Skip to content

Fix Xbox Elite Series 2 Bluetooth input - #643

Draft
jeffscottward wants to merge 1 commit into
nickybmon:mainfrom
jeffscottward:fix/classify-hybrid-hid-gamepads
Draft

Fix Xbox Elite Series 2 Bluetooth input#643
jeffscottward wants to merge 1 commit into
nickybmon:mainfrom
jeffscottward:fix/classify-hybrid-hid-gamepads

Conversation

@jeffscottward

Copy link
Copy Markdown

Summary

  • classify hybrid keyboard/gamepad HID devices as game controllers instead of keyboard-only devices
  • deduplicate multiple IOHIDDeviceRef wrappers that resolve to the same IOKit registry service
  • bridge the exact Bluetooth Xbox Elite Series 2 device (045e:0b05) through Apple’s GameController framework
  • expose stable OpenEmu button, trigger, axis, and hat events while suppressing duplicate raw-HID dispatch
  • fail closed when controller identity is ambiguous, release mapped inputs on disconnect, and reject stale queued callbacks after detach

Root cause

The Elite Series 2 Bluetooth descriptor advertises both Keyboard and GamePad collections. OpenEmu’s keyboard-only routing treated that hybrid device as a keyboard, and the same physical controller could also appear through multiple HID wrappers. After correcting classification and deduplication, raw HID still did not provide usable game input because macOS owns this supported controller through GameController.

The new handler is deliberately limited to the live-proven Bluetooth VID/PID and requires GameController support plus an unambiguous one-controller/one-handler/raw-device match. It does not change the separate wired 045e:0b00 path handled by #641.

Validation

  • focused OEGameControllerHIDDeviceHandlerTests and OEHIDDeviceClassificationTests
  • full OpenEmuSystem test suite
  • xcodebuild analyze with only pre-existing baseline warnings
  • full arm64 Debug OpenEmu workspace build
  • GameController.framework linkage and staged-diff integrity checks
  • independent final review of identity, lifecycle, neutralization, and stale-callback paths

The earlier classification/dedup build was live-verified to register exactly one Elite HID handler. Final physical button/mapping and disconnect/reconnect verification remains pending, so this PR is intentionally opened as a draft.

Addresses #642

@nickybmon

Copy link
Copy Markdown
Owner

Thanks for staring a PR 🙏🏻 let me know when you're ready for a review and I'll jump in.

@jeffscottward

jeffscottward commented Jul 16, 2026 via email

Copy link
Copy Markdown
Author

@nickybmon

Copy link
Copy Markdown
Owner

@jeffscottward haha, no problem! Should I wait and merge this with the other PR back to back once you get this one sorted? or would it be helpful to you to go ahead and merge the other?

@jeffscottward

Copy link
Copy Markdown
Author

@jeffscottward haha, no problem! Should I wait and merge this with the other PR back to back once you get this one sorted? or would it be helpful to you to go ahead and merge the other?

@nickybmon I would definitely wait I'd rather inherit anything upstream from you and then be sure of what I have

@nickybmon

Copy link
Copy Markdown
Owner

@jeffscottward I don't have an Xbox bluetooth controller, so there may not be much I can do to help you, but let me know if there's anything that comes to mind that I could do to help out.

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