Commit Graph

11014 Commits

Author SHA1 Message Date
Sam Lantinga 519384d3b6 Added gamepad mapping for Flydigi Vader 2 with the latest firmware (6.0.4.9)
(cherry picked from commit ed0937598e0a637a1033c90a1b31886537bb288c)
(cherry picked from commit b57a6a1adf15f9a6e4a48e1980aa723d47fa2fe3)
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 b8bc4a234b93efa7a28c7fd7d524d905d9b76e6d)
(cherry picked from commit cfd6b34b8f18ac7b3ea6308c020d759e172df038)
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 d08338ddc5bb3cae1e4ce06201a2cd3c53215aa0)
(cherry picked from commit 8fc10ac95ca23359264a9a185a6b856b5d706b00)
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 6f1f586086a18ab32ddccc05e4616aac02774a1b)
(cherry picked from commit 91ad208d18d86fab25f3993f2d55794d39ead9c7)
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 206fa4dafb633ed074b930cbb3440a9925c532f2)
(cherry picked from commit 715749f578f8379f192c5805ec41804e1a411bf8)
2023-03-18 11:43:07 -07:00
Sam Lantinga d8cb962f9f Sorted controller list
(cherry picked from commit 68e2f230662a0b3f2ce7c0085f781f1652901af3)
(cherry picked from commit 7285f0d441330386758f926aeb8b5be0f4486e4e)
2023-03-18 11:42:36 -07:00
Alfredo Escobar d4a9201b52 Add Hori Pokken Tournament DX Pro Pad
(cherry picked from commit 76552e4780a57f24ec1cd77fb942b7cabe1219d8)
(cherry picked from commit ca3468cb55a49baf32dcaccc85856f0682de8ec4)
2023-03-18 11:42:30 -07:00
Sam Lantinga 1f514f5e3e Sorted controller list
(cherry picked from commit 1c03ddefc320ec9969d5f81c2c3cb988d94a8b4c)
(cherry picked from commit 5b5a72e33c305c87016ab0abe34fe675cf065156)
2023-03-18 11:42:20 -07:00
Antonis Geralis 1f5c590806 Added Elecom 8button gamepad
(cherry picked from commit 52cd9fcbb074771804f443e7a9b2e9436485fe83)
(cherry picked from commit 58fa43e7c35c3180d2c0885c05faf2fe99d574f4)
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 4266cf8504c08b17ef55be11c27f2fc7a17b6edf)
2023-03-18 11:42:10 -07:00
Alynne 106c0e6328 Adds Stadia BT mapping
(cherry picked from commit 4dea13e02fbfd2ac9eeb0a5cbb35cf5d1d53f549)
(cherry picked from commit 92779a5bd8feb9b446bcac9e609cf8b24fe335df)
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 673bc5764942e3f645f1ff7d64f3d6a2059e3cdb)
(cherry picked from commit c4a493de973af6053ef5085d7e67587aba1a8463)
2023-03-18 11:41:38 -07:00
Sam Lantinga 90e2e62691 Fixed sort_controllers.py and resorted game controller database
(cherry picked from commit 917607c335a87edcb3870b8504247609bea3c04d)
(cherry picked from commit 4a87abc966fc657a1b49307d50bf152b2940bcc4)
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 d29e1f363239b45aedf5f81683fbb6cf52029bc2)
(cherry picked from commit 2290d71338f11ac946896101bf732d1b0b52ff13)
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 3951cae4a56fddcb42ce4141a6518c97fa9125cd)
(cherry picked from commit 57ae9f466db41e32c67c5a9a03c28f7803ac02c9)
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 71dc7169d972b500170c7320742949cdebfbccdf)
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 645823fc901c98b688512d3b3e70cc8922e8140c)
(cherry picked from commit 3f00fa16c656d0651c43720d8f84138ac3b998ee)
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 2ca727aec6f5f264620f80999beb5ef77eefec4a)
(cherry picked from commit 46d143376a55817c240a58f226ca944581d414cf)
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 45a58b7882a253db29b1b1393bc2a1fe030d5955)
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 5925cd4ef377a2211fd057ef6fa9f41141999cb7)
(cherry picked from commit 2c6995778e941524a4857b55d4e35745313c924a)
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 727c7d4e2f44102bb571180929bfbb5d527f4f27)
(cherry picked from commit 660fc89967257cf66938fa564208984c4a45e0ff)
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 daffe02b117ccd484763eadc716e4d4453c89868)
(cherry picked from commit ad09976eca7c931ef468119b4a4716ec7e07560e)
2023-02-24 09:23:55 -08:00
Anonymous Maarten dc34e96fff ci: install pkg-config on Macos runner
(cherry picked from commit 86f0c694653eb1f1e91213c7faf3080a96c6375b)
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 bcd97b36d23d08226e98a995eafd3d6aa35401b4)
(cherry picked from commit e7376b7b74026d7da041d2c848e99c9f7f4d74c0)
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 57e78f4cf53b0fc84900a047120263c3c71e721c)
(cherry picked from commit 2cb422360cef4763d16fdd1f753de55ebe858b7a)
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 d1b4810542183a415e42b11b516bf8d5b0a6d58c)
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 ac99db9fc8d528a79abb98a5641e0fd94aa20a9e)
(cherry picked from commit ebc2fb411f178c806119b57ae3c18553d7391a13)
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
Ozkan Sezer 75834df37c cmake: fix detection of library functions when -Werror is enabled.
(Reference issue: https://github.com/libsdl-org/SDL/issues/7011)
2023-01-07 14:25:04 +03:00
Sam Lantinga f070c83a60 Updated to version 2.26.2 for release 2023-01-03 06:45:18 -08:00
Sam Lantinga d992d4f23e Fixed keyboard scancode mapping for parenthesis
(thanks to @meyraud705 for tracking down the root cause!)

Fixes https://github.com/libsdl-org/SDL/issues/6787
Closes https://github.com/libsdl-org/SDL/pull/6937

(cherry picked from commit e1bd5bd071d066e7009261f96c896423f6fd8fd0)
(cherry picked from commit 74229d4a41fd807b152427883fc8738844b64bb2)
2022-12-29 14:56:14 -08:00
Sam Lantinga 81975cc2d0 Fixed getting the VID/PID of a virtual joystick
(cherry picked from commit e40a96155fc488feaeeeb79f947eb43399faa481)
(cherry picked from commit 29a4c5ebc2523f2d9cde1601405dbdafb847c559)
2022-12-28 12:53:07 -08:00
Sam Lantinga 278c78e34c Make sure we match the same way when adding a mapping and looking up a mapping
Fixes https://github.com/libsdl-org/SDL/issues/6898

(cherry picked from commit 3db9112ef4cbb936b11f941f8a98c1704e37e140)
2022-12-28 10:00:00 +03:00
Ozkan Sezer 2462262e0c SDL_thread.h: fix SDL_CreateThreadWithStackSize macro for OS/2
(cherry-picked from commit 738442b82aac8e93d72143b01d374820b6b53bc9)
2022-12-27 00:15:37 +03:00
Ozkan Sezer 162f8e6ee7 SDL_thread.h: fix beginthread param of SDL_CreateThreadWithStackSize for win32
(cherry-picked from commit 29ba5f5d6426f36ee84304dc8a0e111416450aab)
2022-12-27 00:15:37 +03:00
Vincent Hamm d0f8e63ed6 Fix SDL_CreateThreadWithStackSize not passing staacksize with win32 static api 2022-12-27 00:15:37 +03:00
Sam Lantinga 690e2f21f2 Don't send Razer devices the Sony third-party query feature report
Some of them lock up or reset, and the vast majority of devices are not actually game controllers.

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

(cherry picked from commit 83b29f9ce1fe6caa06769544c3b5f6c10ea97a0f)
2022-12-20 00:28:00 +03:00