diff options
author | Sam Lantinga <slouken@libsdl.org> | 2020-03-01 14:52:49 -0800 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2020-03-01 14:52:49 -0800 |
commit | 3e48824735bcae79ddff611eca0c3005a4093120 (patch) | |
tree | 309fd4eb2cdcc613d71981db8c2e689550714244 /Makefile.os2 | |
parent | 18f6b5b8a0d00a1a26acde41679a0a316a872566 (diff) | |
download | sdl-3e48824735bcae79ddff611eca0c3005a4093120.tar.gz |
Fixed bug 4996 - Mac: XBoxOne Bluetooth rumble isn't working
rofferom
I have an annoying issue on MacOS about XBoxOne Bluetooth rumble (Vendor: 0x045e, Product: 0x02fd).
When 360controller is installed, rumble is working correctly. However, Bluetooth rumble isn't working at all, with or without 360controller installed (although it is working with Chrome + https://html5gamepad.com).
I looked at the code, and it seems that XBox controllers are managed in MacOS in this file: SDL_hidapi_xbox360.c. The XBoxOne file is disabled for MacOS in SDL_hidjoystick_c.h.
The function HIDAPI_DriverXbox360_Rumble() is called correctly, and hid_write() returns no error.
I have tried a stupid test. I took the rumble packet from 360controller: https://github.com/360Controller/360Controller/blob/ec4e88eb2d2535e9b32561c702f42fb22b0a7f99/XBOBTFF/FFDriver.cpp#L620. With the patch I have attached, I manage to have rumble working on Bluetooth (with some stupid vibration level, but it proves it can if the packet is changed).
But it breaks the USB rumble with 360controller. A comment in the function makes an explicit reference to 360controller, I think that's why I have broken this specific usecase.
I don't know what is the correct way to fix this, but it seems that the current implementation has a missing case for Bluetooth support.
Note that I also tested master this morning, and I have another issue:
if (!device->ffservice) {
return SDL_Unsupported();
}
test fails in DARWIN_JoystickRumble(). This test has been done quickly, I'm not totaly confident about its accuracy.
Diffstat (limited to 'Makefile.os2')
0 files changed, 0 insertions, 0 deletions