Commit Graph

11023 Commits

Author SHA1 Message Date
Sam Lantinga ac13ca9ab6 The macOS minimum deployment target is now 10.11
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)
2023-04-05 11:42:08 -07:00
Sam Lantinga 3fae4c5c83 Updated to version 2.26.5 for release 2023-04-04 17:57:53 -07:00
Sam Lantinga 67100be3cf Fixed crash if dbus can't be initialized
(cherry picked from commit cf2c6fa58d)
(cherry picked from commit 57043825ba)
2023-04-04 12:36:05 -07:00
Sam Lantinga 4fb81fdff9 Fixed analog triggers on the DualSense controller
(cherry picked from commit a67d410501)
(cherry picked from commit 866f7c7f7c496343ad21d32f8edc76390e11101d)
2023-03-30 07:46:14 -07:00
Sam Lantinga d94b944f91 Added support for the trigger buttons on the Victrix Pro FS for PS5
(cherry picked from commit 8d7e61ea42364c256b76e7f6f2b6d6f90742bcb7)
(cherry picked from commit ab1670386f)
2023-03-30 07:46:13 -07:00
Sam Lantinga 384144d632 The Xinmotek Controller is used in multiple products with different mappings
The mapping included here is for the Ultimate Atari Fight Stick

(cherry picked from commit f1099f8e70)
(cherry picked from commit c2ee45f5ff)
2023-03-30 07:44:44 -07:00
Pierre Wendling f84428ca01 SDL_hidapi_steam.c: Fix compilation under c2x.
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)
2023-03-30 07:42:30 -07:00
Frank Praznik 086322076a events: Increase the size of the name buffer when logging events
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)
2023-03-30 07:42:00 -07:00
Ivan Mogilko 24098b75b1 Fixed SDL_RenderSetVSync does not update flags if simulated vsync is on
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)
2023-03-18 11:44:05 -07:00
Sam Lantinga 519384d3b6 Added gamepad mapping for Flydigi Vader 2 with the latest firmware (6.0.4.9)
(cherry picked from commit ed0937598e)
(cherry picked from commit b57a6a1adf)
2023-03-18 11:43:38 -07:00
Lokathor b01194345f Make mappings for "Retrolink SNES Controller" with `SDL_GAMECONTROLLER_USE_BUTTON_LABELS` both on and off
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)
2023-03-18 11:43:22 -07:00
Sam Lantinga 848cf421c9 Added mapping for the Xbox Elite Core controller connected via Bluetooth on Android
(cherry picked from commit d08338ddc5)
(cherry picked from commit 8fc10ac95c)
2023-03-18 11:43:17 -07:00
divVerent 1545b233a6 Fix Xbox One gamepad axis assignment on SDL_JOYSTICK_ANDROID API (#7405)
(cherry picked from commit 6f1f586086)
(cherry picked from commit 91ad208d18)
2023-03-18 11:43:13 -07:00
Sam Lantinga 46a3a8e88f Added mapping for DualSense Edge Wireless Controller on Linux
This is a mapping when using evdev, not the more advanced HIDAPI support.

(cherry picked from commit 206fa4dafb)
(cherry picked from commit 715749f578)
2023-03-18 11:43:07 -07:00
Sam Lantinga d8cb962f9f Sorted controller list
(cherry picked from commit 68e2f23066)
(cherry picked from commit 7285f0d441)
2023-03-18 11:42:36 -07:00
Alfredo Escobar d4a9201b52 Add Hori Pokken Tournament DX Pro Pad
(cherry picked from commit 76552e4780)
(cherry picked from commit ca3468cb55)
2023-03-18 11:42:30 -07:00
Sam Lantinga 1f514f5e3e Sorted controller list
(cherry picked from commit 1c03ddefc3)
(cherry picked from commit 5b5a72e33c)
2023-03-18 11:42:20 -07:00
Antonis Geralis 1f5c590806 Added Elecom 8button gamepad
(cherry picked from commit 52cd9fcbb0)
(cherry picked from commit 58fa43e7c3)
2023-03-18 11:42:15 -07:00
Leonardo Brondani Schenkel fb1a01a3dd Add Linux mapping for 8BitDo Pro 2 Wired Controller for Xbox
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)
2023-03-18 11:42:10 -07:00
Alynne 106c0e6328 Adds Stadia BT mapping
(cherry picked from commit 4dea13e02f)
(cherry picked from commit 92779a5bd8)
2023-03-18 11:41:44 -07:00
Sam Lantinga 1fd1f7d565 Don't accept official mappings for controllers that aren't unique
For example, the DragonRise Inc. Generic USB Joystick
See https://github.com/gabomdq/SDL_GameControllerDB/issues/202 for details

(cherry picked from commit 673bc57649)
(cherry picked from commit c4a493de97)
2023-03-18 11:41:38 -07:00
Sam Lantinga 90e2e62691 Fixed sort_controllers.py and resorted game controller database
(cherry picked from commit 917607c335)
(cherry picked from commit 4a87abc966)
2023-03-18 11:41:31 -07:00
Sam Lantinga 3e5497777e Added gamepad mappings for the Xin-Mo Dual Arcade Fightstick
(cherry picked from commit d29e1f3632)
(cherry picked from commit 2290d71338)
2023-03-18 11:41:24 -07:00
Anonymous Maarten 3cbd8823ba cmake: get_filename_component(EXT) retturns extension including leading dot 2023-03-15 14:57:08 +01:00
Sam Lantinga 2fe5f3239c Ignore the PS4 packet CRC if it's not being set correctly
This fixes handling the 8BitDo SN30 Pro with the 2.00 firmware in PS4 mode

Fixes https://github.com/libsdl-org/SDL/issues/7270

(cherry picked from commit 3951cae4a5)
(cherry picked from commit 57ae9f466d)
2023-03-13 20:00:52 -07:00
Qrox 20e17559e5 Uses integer arithmetics in SDL_ResampleAudio
- 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
2023-03-09 22:13:17 -08:00
Sam Lantinga ae5fdc0b00 Added header for SDL_Delay()
(cherry picked from commit 71dc7169d9)
2023-03-09 17:19:06 -08:00
Sam Lantinga 45167b9d13 Wait for the GCController framework to see IOKit devices
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)
2023-03-09 16:13:48 -08:00
Sam Lantinga 596a594714 If the client rect is empty, use the last known window size
This happens on Windows 11 with fullscreen desktop windows when the desktop is brought up with the Windows+D shortcut.

Fixes https://github.com/libsdl-org/SDL/issues/7419

(cherry picked from commit 2ca727aec6)
(cherry picked from commit 46d143376a)
2023-03-09 10:40:53 -08:00
Ozkan Sezer 69875ad80f Removed guard around the enabled assertions support code
Otherwise, SDL_assert_always() wouldn't work.

Fixes https://github.com/libsdl-org/SDL/issues/7433
2023-03-09 20:51:50 +03:00
Deve 54ca4d3879 Fixed incorrect modifier keys handling on macOS
(cherry-picked from commit 45a58b7882)
2023-03-09 20:28:50 +03:00
Sam Lantinga 1723e93a0c Fixed handling simple mode PS4 reports
Fixes https://github.com/libsdl-org/SDL/issues/7270

(cherry picked from commit 5925cd4ef3)
(cherry picked from commit 2c6995778e)
2023-03-08 12:27:00 -08:00
Sam Lantinga 07d0f51fa2 Updated to version 2.26.4 for release 2023-03-06 15:52:05 -08:00
Sam Lantinga cbc2b014b6 Don't clobber an existing entry with a different version when adding a gamepad mapping
(cherry picked from commit 727c7d4e2f)
(cherry picked from commit 660fc89967)
2023-03-01 16:46:24 -08:00
Sam Lantinga fa9f7c70c5 Fixed relative mouse motion over remote desktop
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)
2023-02-24 09:23:55 -08:00
Anonymous Maarten dc34e96fff ci: install pkg-config on Macos runner
(cherry picked from commit 86f0c69465)
2023-02-17 01:05:01 +03:00
Sam Lantinga 6edc0100e1 Fixed Steam Runtime sandbox detection
Fixes hotplug issues on Steam Deck for Proton and native games

(cherry picked from commit bcd97b36d2)
(cherry picked from commit e7376b7b74)
2023-02-15 13:55:31 -08:00
Ozkan Sezer 9b061c04e7 cmake: really fix detection of pthread_setname_np() on Apple platforms. 2023-02-13 11:56:10 +03:00
Ozkan Sezer 718a880f91 cmake: fix detection of pthread_setname_np() on Apple platforms. 2023-02-13 11:55:40 +03:00
Ozkan Sezer 853ee9a3e6 testime.c fixes from SDL2 branch. 2023-02-10 11:11:10 +03:00
Sam Lantinga adf31f6ec0 Updated to version 2.26.3 for release 2023-02-06 14:08:14 -08:00
Anonymous Maarten 20c2fa18fe cmake: assume autotools static libraries with lib prefix and .a suffix 2023-02-01 19:15:05 +01:00
Ozkan Sezer 4f94da5c53 typo fix to config.sub,
from https://lists.gnu.org/archive/html/config-patches/2023-01/msg00001.html
2023-01-21 10:15:02 +03:00
happyharryh c816300615 Fixed the hat_map to avoid segmentation fault
(cherry picked from commit 57e78f4cf5)
(cherry picked from commit 2cb422360c)
2023-01-12 07:01:17 -08:00
Sam Lantinga ce67788629 Fixed centering the D-pad on some joysticks
Fixes https://github.com/libsdl-org/SDL/issues/6767

(cherry picked from commit d1b4810542)
2023-01-12 07:01:17 -08:00
Sam Lantinga 05b03032f1 Updated copyright for 2023 2023-01-09 09:52:59 -08:00
Ozkan Sezer c49d02cd13 cmake (CheckPTHREAD): remove _GNU_SOURCE define after bug #7026 fix 2023-01-09 01:32:00 +03:00
Anonymous Maarten e312fbb37d cmake: do all compile tests with -D_GNU_SOURCE=1 2023-01-08 19:23:02 +01:00
Sam Lantinga 3c72e2de4d Fixed infinite loop shutting down WGI controllers
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)
2023-01-08 09:36:17 -08:00
Ozkan Sezer 8e31fc4130 cmake: check for math library functions even in the absence of libm
(Reference issue: https://github.com/libsdl-org/SDL/issues/7011)
2023-01-07 14:25:04 +03:00