Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gamepad: Add macOS support for "2Axes 8Keys".
Add support for a generic gamepad controller that reports as Vendor=0x0079 and Product=0x0011 on macOS. Support for this controller first landed in chromiumcodereview.appspot.com/12621002 with a mapping only for Windows. These Vendor/Product IDs appear to be used for several low-end controller clones. The controller used when verifying this change was the Vilros Retro Classic USB Gamepad (Sega Genesis version). https://vilros.com/products/vilros-retro-gaming-usb-classic-controller-set-of-5 The left/right D-Pad buttons do not work properly on macOS for the Vilros controller because it maps four buttons to the same value. A follow-on CL will address this. ``` 0x05, 0x01, // Usage Page (Generic Desktop Ctrls) 0x09, 0x04, // Usage (Joystick) 0xA1, 0x01, // Collection (Application) 0xA1, 0x02, // Collection (Logical) 0x75, 0x08, // Report Size (8) 0x95, 0x05, // Report Count (5) 0x15, 0x00, // Logical Minimum (0) 0x26, 0xFF, 0x00, // Logical Maximum (255) 0x35, 0x00, // Physical Minimum (0) 0x46, 0xFF, 0x00, // Physical Maximum (255) 0x09, 0x30, // Usage (X) 0x09, 0x30, // Usage (X) 0x09, 0x30, // Usage (X) 0x09, 0x30, // Usage (X) 0x09, 0x31, // Usage (Y) 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) 0x75, 0x04, // Report Size (4) 0x95, 0x01, // Report Count (1) 0x25, 0x07, // Logical Maximum (7) 0x46, 0x3B, 0x01, // Physical Maximum (315) 0x65, 0x14, // Unit (System: English Rotation, Length: Centimeter) 0x09, 0x00, // Usage (Undefined) 0x81, 0x42, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,Null State) 0x65, 0x00, // Unit (None) ``` Bug: 1234099 Change-Id: I101fbb25a4ddf38c5d795878d43bf4789fb75a24 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3146150 Reviewed-by: Matt Reynolds <mattreynolds@chromium.org> Commit-Queue: Chris Mumford <cmumford@google.com> Cr-Commit-Position: refs/heads/main@{#919420}
- Loading branch information