The SIGILL handler is not very reliable and can cause crashes.
Linux provides the CPU's AltiVec support status in getauxval.
(cherry picked from commit 7490471796)
(cherry picked from commit 17e6208c1b)
Unregistering the input report callback marks the device as disconnected, so IOHIDDeviceClose() would never be called if the device wasn't already disconnected when hid_close() was called.
Fixes https://github.com/libsdl-org/SDL/issues/12255
(cherry picked from commit 2442c85cb8)
It looks like both macOS (15.1.1) and SDL are trying to talk to the controller at the same time, which can cause interleaved replies or even locking up the controller. Waiting a bit before talking to the controller seems to take care of this.
(cherry picked from commit 45b01d16b1)
On Windows 11, apparently HidD_GetManufacturerString() and HidD_GetProductString() can return TRUE without actually filling in any string data.
Fixes https://github.com/libsdl-org/SDL/issues/12566
(cherry picked from commit 4fc9509ab7)
(cherry picked from commit 52146cf067)
Allows users to overwrite the number of haptic axes defined for a given
joystick. Also supports a "wildcard" VID:PID of 0xFFFF/0xFFFF
(cherry picked from commit 0809be4ec5)
When the flushing is not able to keep up with the audio stream coming in,
it will end up flushing forever and block API clients from getting any audio.
Fixes#9706
(cherry picked from commit 24693ac285)
1) The classic Intel compiler is depreated in favor of the oneapi compiler
2) SPA_FALLTHROUGH is used in pipewire's spa/utils/json.h, and causes build errors
(cherry picked from commit d2eb72fd14)
Merged upstream fix for macOS:
https://github.com/libusb/hidapi/commit/cdc473dfe43f6432dda7ad53d7656b8ae8ff968b
In one of the early versions of macOS, when you try to close the device
with IOHIDDeviceClose() that is being physically disconnected.
Starting with some version of macOS, this crash bug was fixed,
and starting with macSO 10.15 the opposite effect took place:
in some environments crash happens if IOHIDDeviceClose() is _not_ called.
This patch is to keep a workaround for old versions of macOS,
and don't have a leak in new/tested environments.
Fixes https://github.com/libsdl-org/SDL/issues/12255
(cherry picked from commit 5925c27efb)
Newer versions of Proton properly pass through the Steam virtual gamepad VID/PID, but older Proton (9.x and older) don't, so we have to rely on Steam and Proton hiding controllers we shouldn't have access to.
Fixes https://github.com/libsdl-org/SDL/issues/12106
Sometimes we'll get a Windows.Gaming.Input callback before the raw input device is even in the list, so try some other methods to better detect XInput devices.