-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a few device GUIDs to is_xinput_device
fixing controller problems
#78043
Conversation
Thanks for the patch! It seems correct and should be fine to merge. There are more issues with this code that we'll need to address eventually though. Both #71784 and this PR added missing devices, but there are quite a few more Xbox Bluetooth/BLE controllers with a similar issue. This code was originally based off SDL's, but it seems like they changed their approach in 2019 with libsdl-org/SDL@6509644 We can see that back then they had a few more devices which we still lack: static GUID IID_ValveStreamingGamepad = { MAKELONG(0x28DE, 0x11FF), 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } };
static GUID IID_X360WiredGamepad = { MAKELONG(0x045E, 0x02A1), 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } };
static GUID IID_X360WirelessGamepad = { MAKELONG(0x045E, 0x028E), 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } };
// Missing in Godot.
static GUID IID_XOneWiredGamepad = { MAKELONG(0x045E, 0x02FF), 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } };
// Missing in Godot.
static GUID IID_XOneWirelessGamepad = { MAKELONG(0x045E, 0x02DD), 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } };
// Missing in Godot.
static GUID IID_XOneNewWirelessGamepad = { MAKELONG(0x045E, 0x02D1), 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } };
// Missing in Godot.
static GUID IID_XOneSWirelessGamepad = { MAKELONG(0x045E, 0x02EA), 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } };
// Missing in Godot.
static GUID IID_XOneSBluetoothGamepad = { MAKELONG(0x045E, 0x02E0), 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } };
// Missing in Godot.
static GUID IID_XOneEliteWirelessGamepad = { MAKELONG(0x045E, 0x02E3), 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } }; And now we have a couple entries which they didn't have back in 2019: static GUID IID_XSWirelessGamepad = { MAKELONG(0x045E, 0x0B13), 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } };
static GUID IID_XEliteWirelessGamepad = { MAKELONG(0x045E, 0x0B05), 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } }; Longer term, we want to investigate leveraging SDL2 directly for gamepad mapping instead of trying to play catch with them and vendors. Short term, I guess adding the other missing ones identified above would be useful. Let me know if you're interested in doing it, or if I should pick it up. |
8e636e4
to
e3a67ec
Compare
Thanks for the list @akien-mga! Absolutely makes sense to include those in godot as well until the problem is solved for good. I can quickly do that, should I just change this PR or open a new one? |
It's best if you can amend this PR directly to add all the gamepads we identified so far at once. |
e3a67ec
to
19ce63d
Compare
Thanks! Technically your first merged contribution as far as GitHub is concerned, but I know you've done a ton to help fix issues on threaded resource loading already. Still, congrats for your first merged PR ;) |
Thanks 😊 |
Cherry-picked for 3.6. |
Cherry-picked for 3.5.3. |
is_xinput_device
fixing controller problems
The Xbox Elite Wireless gamepad has strange input problems in Windows, which we identified as the same problem as in this PR: #71784 and fixed in the same way (by adding another hardcoded device ID to JoypadWindows::is_xinput_device).
The fix was tested with a Xbox Elite Wireless gamepad and it works.
Update: added more GUIDs from SDL, as discussed below.
Probably also fixes #76724 now.