We don't want the G29 to show up as a gamepad, Steam will create a virtual Xbox controller for it, which breaks racing games.
(cherry picked from commit dce6ed56d72b436f15c044b05097ddebbc166701)
This reverts commit 33a68f575f.
We don't want the G29 to show up as a gamepad, Steam will create a virtual Xbox controller for it, which breaks racing games.
(cherry picked from commit e3d430b83eb7c754c789fb23184feb745c2b99a8)
Most of these are probably harmless, but the changes to SDL_immdevice.c and SDL_pixels.c appear to have fixed genuine bugs.
SDL_audiocvt.c: By separating the calculation of the divisor, I got rid of the suspicion that dividing a double by an integer led to loss of precision.
SDL_immdevice.c: Added a missing test, one that could have otherwise led to dereferencing a null pointer.
SDL_events.c, SDL_gamecontroller.c, SDL_joystick.c, SDL_malloc.c, SDL_video.c: Made it clear the return values weren't used.
SDL_hidapi_shield.c: The size is zero, so nothing bad would have happened, but the SDL_memset() was still being given an address outside of the array's range.
SDL_dinputjoystick.c: Initialize local data, just in case IDirectInputDevice8_GetProperty() isn't guaranteed to write to it.
SDL_render_sw.c: drawstate.viewport could be null (as seen on line 691).
SDL.c: SDL_MostSignificantBitIndex32() could return -1, though I don't know if you want to cope with that (what I did) or SDL_assert() that it can't happen.
SDL_hints.c: Replaced boolean tests on pointer values with comparisons to NULL.
SDL_pixels.c: Looks like the switch is genuinely missing a break!
SDL_rect_impl.h: The MacOS static checker pointed out issues with the X comparisons that were handled by assertions; I added assertions for the Y comparisons.
SDL_yuv.c, SDL_windowskeyboard.c, SDL_windowswindow.c: Checked error-result returns.
Sending rumble to the Amazon Luna controller on macOS gets there, but IOHIDDeviceSetReport() blocks for a long time and eventually fails.
This appears to be a bug in the macOS Bluetooth stack, ref rdar://99265496
This is a USB adapter for controllers shipped with Nintendo's NES-mini and
SNES-mini consoles.
Tested with both NES and SNES controllers, buttons map as expected on both.
This works around udev event nodes arriving before hidraw nodes and the controller being opened twice - once using the Linux driver and once by the HIDAPI driver.
This also fixes a kernel panic on Steam Link hardware due to trying to open the hidraw device node too early.
A delay of 10 ms seems to be a good value, tested on Steam Link hardware.
The controller can use either hat or buttons for the D-Pad, depending on what Linux driver is in use. The automatic mapping in LINUX_JoystickGetGamepadMapping() will do the right thing based on the exposed capability bits.
I'm sure this is the case for other controllers as well, so we might be removing more mappings over time.
Disabling RAWINPUT on Windows 10 causes these issues:
* All Xbox controllers are named "XInput Controller".
* Trigger rumble no longer works.
* "XInput Controllers" are now also listed as separate haptic devices
It's only needed to support more than 4 Xbox controllers, and adds significant complexity to the joystick processing, and we regularly get bugs from people who aren't using an SDL window who need to turn on SDL_HINT_JOYSTICK_THREAD.