Xcode 14.3 does not allow targeting 10.9, the minimum recommended version is 10.13 and the minimum possible version is 10.11.
(cherry picked from commit 73b2faea4e)
(cherry picked from commit 51dcc3bb0b)
When N2935 is implemented, the enum breaks compilation. Use a #define of
the SDL booleans instead.
(cherry picked from commit 975039ce0d)
(cherry picked from commit ed5a343d25)
Event names have grown in length and are occasionally truncated when being logged (e.g. SDL_EVENT_WINDOW_PIXEL_SIZE_CHA). Increase the event name buffer size to handle the longer names.
(cherry picked from commit 203a2a76fc)
(cherry picked from commit c0824cd49a)
This lets the user to correctly detect current vsync state by reading SDL_RendererInfo.
Also fixes SetVSync's return value check (it may be positive for error too).
(cherry picked from commit d78072fcd4)
I've only tested this on windows, but I went ahead and made the same changes for linux and mac because I assumed it's the same there and that we'd want to keep the three platforms in sync.
(cherry picked from commit b8bc4a234b)
(cherry picked from commit cfd6b34b8f)
This is a mapping when using evdev, not the more advanced HIDAPI support.
(cherry picked from commit 206fa4dafb)
(cherry picked from commit 715749f578)
Without these mappings, this controller "kinda" works out of the box:
- `SDL_GameControllerMapping()` works because it will notice "Xbox" in
the name and use the default XInput mappings
- `SDL_GameControllerMappingForGUID()` will not find any mapping
lsusb:
```
ID 2dc8:2000 8BitDo 8BitDo Pro 2 Wired Controller for Xbox
```
In Linux this controller is supported by two drivers:
- `xpad` (built-in to the kernel), exposes the controller name from the
USB descriptor and the GUID starts with 03 (0x03 = BUS_USB)
- `xone` (https://github.com/medusalix/xone), exposes a virtual
controller which is always named "Microsoft X-Box One pad" and the
GUID starts with 06 (0x06 = BUS_VIRTUAL)
This commit adds the 2 GUIDs from both drivers so mappings will always
be found and the real controller name will always be reported.
(cherry picked from commit 4266cf8504)
- Avoids precision loss caused by large floating point numbers.
- Adds unit test to test the signal-to-noise ratio and maximum error of resampler.
- Code cleanup
It occasionally takes a few millseconds for the GCController framework to handle the device notification and set up the device
Fixes the duplicate controller issue in https://github.com/libsdl-org/SDL/issues/6686
(cherry picked from commit 645823fc90)
(cherry picked from commit 3f00fa16c6)
Setting the cursor clip area to a single pixel prevents the relative mouse motion remote desktop warping from working, so the mouse is never recentered.
(cherry picked from commit daffe02b11)
(cherry picked from commit ad09976eca)
We are guaranteed that the lock will be held during shutdown, so if we are in InvokeRemoved(), it's because we're shutting down controllers and need to remove them from our internal list.
Fixes https://github.com/libsdl-org/SDL/issues/7016
(cherry picked from commit ac99db9fc8)
(cherry picked from commit ebc2fb411f)