Tue, 17 Mar 2020 02:31:47 -0400Backout prior fix for Bug 5034, which needs more research
David Ludwig <dludwig@pobox.com> [Tue, 17 Mar 2020 02:31:47 -0400] rev 13642
Backout prior fix for Bug 5034, which needs more research

This backs-out the change, https://hg.libsdl.org/SDL/rev/ca87b62e4e17

Mon, 16 Mar 2020 22:34:33 -0700Fixed compile warning
Sam Lantinga <slouken@libsdl.org> [Mon, 16 Mar 2020 22:34:33 -0700] rev 13641
Fixed compile warning

Mon, 16 Mar 2020 19:15:28 -0700Fixed compiler warning
Sam Lantinga <slouken@libsdl.org> [Mon, 16 Mar 2020 19:15:28 -0700] rev 13640
Fixed compiler warning

Mon, 16 Mar 2020 16:52:49 -0700Fix compile error
Jimb Esser <wasteland@gmail.com> [Mon, 16 Mar 2020 16:52:49 -0700] rev 13639
Fix compile error

Mon, 16 Mar 2020 19:24:25 -0400Fixed Bug 5034 - Replugging in a controller crashes on macOS in SDL 2.0.12
David Ludwig <dludwig@pobox.com> [Mon, 16 Mar 2020 19:24:25 -0400] rev 13638
Fixed Bug 5034 - Replugging in a controller crashes on macOS in SDL 2.0.12

The Darwin/macOS joystick driver was freeing its joystick's hwdata field
without zeroing it out in any live instance of SDL_Joystick.

Mon, 16 Mar 2020 14:49:20 -0700Fix compiler warnings
Jimb Esser <wasteland@gmail.com> [Mon, 16 Mar 2020 14:49:20 -0700] rev 13637
Fix compiler warnings

Mon, 16 Mar 2020 17:19:18 -0400virtual joysticks: move variable decls to top of function (for C90 compat; Bug 5038)
David Ludwig <dludwig@pobox.com> [Mon, 16 Mar 2020 17:19:18 -0400] rev 13636
virtual joysticks: move variable decls to top of function (for C90 compat; Bug 5038)

Mon, 16 Mar 2020 13:28:38 -0700Fixed bug 3446 - The haptic API does not allow to select the direction axes
Sam Lantinga <slouken@libsdl.org> [Mon, 16 Mar 2020 13:28:38 -0700] rev 13635
Fixed bug 3446 - The haptic API does not allow to select the direction axes

Mathieu Laurendeau

Consider a device supporting effects on multiple axes.
There's currently no way to play effects against a single-axis direction.


A device supporting effects against X and Y may not allow to play effects with a two-axis direction coordinate, even if one of the coordinates is null.

My current (ugly) work around for this is to add a direction type SDL_HAPTIC_X_FORCE to play effects against a X-axis only direction (patch attached).

This issue impacted two GIMX users using the following wheels:
- Leo Bodnar SimSteering force feedback wheel
- Accuforce direct drive wheel

Playing constant/spring/damper effects against a X-axis direction worked well for the first wheel, but not for the second one.

A better strategy seems to play the effects against the first axis reported by the DirectInput enumeration.

This strategy also works with Logitech wheels (at least the DFGT).

It's been more than a year that I have the latest patch (playing effects against the first axis only) in the GIMX software. It's being used by thousands of people, mostly for adapting their FFB wheel to the PS4. I had no report that proves this strategy to be wrong.

Mon, 16 Mar 2020 12:25:02 -0700Fixed bug 4477 - Support more than 4 XInput-capable devices on Windows
Sam Lantinga <slouken@libsdl.org> [Mon, 16 Mar 2020 12:25:02 -0700] rev 13634
Fixed bug 4477 - Support more than 4 XInput-capable devices on Windows

Jimb Esser

Add new RawInput controller API, and improved correlation with XInput/WGI

Reorder joystick init so drivers can ask the others if they handle a device reliably
Do not poll disconnected XInput devices (major perf issue)
Fix various cases where incorrect correlation could happen
Simple mechanism for propagating unhandled Guide button presses even before guaranteed correlation
Correlate by axis motion as well as button presses
Fix failing to zero other trigger
Fix SDL_HINT_JOYSTICK_HIDAPI not working if set before calling SDL_Init()
Add missing device to device names
Disable RawInput if we have a mismatch of XInput-capable but not RawInput-capable devices

Updated to SDL 2.0.13 code with the following notes:
New HID driver: xbox360w - no idea what that is, hopefully urelated
SDL_hidapijoystick.c had been refactored to couple data handling logic with device opening logic and device lists caused some problems, yields slightly uglier integration than previously when the 360 HID device driver was just handling the data.
SDL_hidapijoystick.c now often pulls the device off of the joystick_hwdata structure for some rumble logic, but it appears that code path is never reached, so probably not a problem.
Looks like joystick_hwdata was refactored to not include a mutex in other drivers, maintainers may want to do the same refactor here if that's useful for some reason.
Something changed in how devices get names, so getting generic names.
Had to fix a (new?) bug where removing an XInput controller caused existing controllers (that moved to a new XInput index) to get identified as 0x045e/0x02fd ("it's probably Bluetooth" in code), rendering the existing HIDAPI_IsDevicePresent and new RAWINPUT_IsDevicePresent unreliable.

Mon, 16 Mar 2020 12:23:38 -0700Fixed bug 4477 - Support more than 4 XInput-capable devices on Windows
Sam Lantinga <slouken@libsdl.org> [Mon, 16 Mar 2020 12:23:38 -0700] rev 13633
Fixed bug 4477 - Support more than 4 XInput-capable devices on Windows

Jimb Esser

Add new RawInput controller API, and improved correlation with XInput/WGI

Reorder joystick init so drivers can ask the others if they handle a device reliably
Do not poll disconnected XInput devices (major perf issue)
Fix various cases where incorrect correlation could happen
Simple mechanism for propagating unhandled Guide button presses even before guaranteed correlation
Correlate by axis motion as well as button presses
Fix failing to zero other trigger
Fix SDL_HINT_JOYSTICK_HIDAPI not working if set before calling SDL_Init()
Add missing device to device names
Disable RawInput if we have a mismatch of XInput-capable but not RawInput-capable devices

Updated to SDL 2.0.13 code with the following notes:
New HID driver: xbox360w - no idea what that is, hopefully urelated
SDL_hidapijoystick.c had been refactored to couple data handling logic with device opening logic and device lists caused some problems, yields slightly uglier integration than previously when the 360 HID device driver was just handling the data.
SDL_hidapijoystick.c now often pulls the device off of the joystick_hwdata structure for some rumble logic, but it appears that code path is never reached, so probably not a problem.
Looks like joystick_hwdata was refactored to not include a mutex in other drivers, maintainers may want to do the same refactor here if that's useful for some reason.
Something changed in how devices get names, so getting generic names.
Had to fix a (new?) bug where removing an XInput controller caused existing controllers (that moved to a new XInput index) to get identified as 0x045e/0x02fd ("it's probably Bluetooth" in code), rendering the existing HIDAPI_IsDevicePresent and new RAWINPUT_IsDevicePresent unreliable.