The comment in the source wasn't true; PipeWire doesn't _have_ to work in
float format. It presumably does if it has to mix, but if a game is the only
thing making noise on the system--a common scenario--then it might be able to
pass, say, Sint16 data straight through to the hardware without conversion.
Fixes#12129.
(cherry picked from commit afc1d9122b)
On newer systems, the trick isn't necessary, and if you do it, if the user is
moving the mouse when launching the app, it'll show a hidden Dock.
Fixes#10340.
(manually backported from SDL3 from commit 279dabfc96)
(cherry picked from commit b2c3e6fade)
SDL_PrivateJoystickAdded was called before setting the InstanceId in the adapters ctx->joysticks array. This would eventually broadcast the SDL_EVENT_JOYSTICK_ADDED event with the new InstanceId, if your program listens for the added events and opens joysticks at that point it would always fail because there would be no matching InstanceId in the ctx->joysticks array.
(cherry picked from commit afd1e51023)
(cherry picked from commit 4b4f6b3e22)
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)
Merged upstream fix for macOS:
cdc473dfe4
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)