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
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
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
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
Sam Lantinga
1f514f5e3e
Sorted controller list
...
(cherry picked from commit 1c03ddefc3 )
(cherry picked from commit 5b5a72e33c )
2023-03-18 11:42:20 -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
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
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
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
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
Sam Lantinga
adf31f6ec0
Updated to version 2.26.3 for release
2023-02-06 14:08:14 -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
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
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 e1bd5bd071 )
(cherry picked from commit 74229d4a41 )
2022-12-29 14:56:14 -08:00
Sam Lantinga
81975cc2d0
Fixed getting the VID/PID of a virtual joystick
...
(cherry picked from commit e40a96155f )
(cherry picked from commit 29a4c5ebc2 )
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 3db9112ef4 )
2022-12-28 10:00:00 +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 83b29f9ce1 )
2022-12-20 00:28:00 +03:00
Sam Lantinga
6b5610752b
Don't try to open the Razer Huntsman Elite keyboard as a controller
...
(cherry picked from commit 817454cfe6 )
2022-12-13 01:20:11 -08:00
Sam Lantinga
2d86b4ef76
Removed check for _HAVE_STDINT_H, which nobody defines
...
Fixes https://github.com/libsdl-org/SDL/issues/6619
(cherry picked from commit e29c0661cc )
2022-12-01 12:54:59 -08:00
Sam Lantinga
f17058b562
Updated to version 2.26.1 for release
2022-12-01 11:54:51 -08:00
Sam Lantinga
2879f2aeba
Fixed crash if GetRectDisplayIndex() is called before SDL_VideoInit()
...
(cherry picked from commit d87048fd5a )
2022-11-30 14:49:39 -08:00
Sam Lantinga
92057e683e
Temporary hack to address performance issues in https://github.com/libsdl-org/SDL/issues/6581#issuecomment-1327987916 (thanks @icculus!)
...
(cherry picked from commit 9c8369e097 )
2022-11-26 13:11:41 -08:00
Sam Lantinga
479e972e56
Removed G29 from controller_type.c
...
We don't want the G29 to show up as a gamepad, Steam will create a virtual Xbox controller for it, which breaks racing games.
(cherry picked from commit dce6ed56d7 )
2022-11-22 10:58:01 -08:00
Sam Lantinga
3bf150e900
Revert "Added Linux mappings for the Logitech G29 in PS3 and PS4 modes"
...
This reverts commit 33a68f575f .
We don't want the G29 to show up as a gamepad, Steam will create a virtual Xbox controller for it, which breaks racing games.
(cherry picked from commit e3d430b83e )
2022-11-22 10:57:58 -08:00
Sam Lantinga
0bfeed061b
Updated to version 2.26.0 for release
2022-11-21 16:15:58 -08:00
Sam Lantinga
d167cd6715
Added the Gunfighter Mk.III ‘Space Combat Edition’ as a flight stick
2022-11-21 09:02:10 -08:00
Sam Lantinga
8b20b568b0
Don't report battery level for disconnected batteries
...
Fixes https://github.com/libsdl-org/SDL/issues/6536
2022-11-21 07:42:14 -08:00
Sam Lantinga
8ae46a49ea
Save the version in VERSION.txt instead of VERSION
...
Fixes https://github.com/libsdl-org/SDL/issues/6558
2022-11-21 06:57:02 -08:00
Sam Lantinga
802c624ab3
Strip trailing newline when reading the VERSION file
2022-11-20 14:37:05 -08:00
Sam Lantinga
509939b1b6
Disable the third party PS3 HIDAPI driver by default, the L3/R3 buttons are unknown
2022-11-18 18:20:53 -08:00
Sam Lantinga
ff99e56d3a
Fixed KMSDRM window creation failing if OpenGL libraries are not available, but GLES 2.0 libraries are
2022-11-18 12:54:55 -08:00
Sam Lantinga
da9ba3a2a1
If a CRTC doesn't have a mode configured, use the preferred or largest mode as the default mode
...
Fixes https://github.com/libsdl-org/SDL/issues/6421
2022-11-18 12:17:27 -08:00
Sam Lantinga
ea4ea27a59
Don't trigger an error if we try to delete a touch device after shutting down the touch system
...
This can happen on Raspberry Pi if the display system fails to initialize.
2022-11-18 11:14:14 -08:00
Sam Lantinga
9209942949
Revert "sdl2-config.in: Deprecate sdl2-config"
...
This reverts commit e0d904e90b .
SDL 3 will have the recommended path forward, we don't need to nag in SDL 2.
2022-11-18 06:53:13 -08:00
Sam Lantinga
769ae185d6
Revert "sdl2.m4: Deprecate AM_PATH_SDL2 in favour of PKG_CHECK_MODULES"
...
This reverts commit a66cb8cf21 .
SDL 3 will have the recommended path forward, we don't need to nag in SDL 2.
2022-11-18 06:52:12 -08:00
Sam Lantinga
78ea6af2cd
Updated to version 2.25.1 for release candidate
2022-11-17 09:01:35 -08:00
Sam Lantinga
1f87e9e24e
Updated patch notes for 2.26 release
2022-11-17 09:00:27 -08:00
Sam Lantinga
77bcd269be
Allow creating an empty surface with pitch 0
...
This fixes Maelstrom, which creates an empty staging surface and then uses it for transfer to texture
2022-11-16 22:23:16 -08:00
Sam Lantinga
913e403f2a
Fixed error message when trying to create an OpenGLES2 renderer on macOS
...
Testing: testsprite2 --renderer opengles2
OpenGLES2 isn't available by default, and we want to see the error "Could not load EGL library"
2022-11-16 18:03:29 -08:00
Sam Lantinga
fcc994e132
ensure that SDL2 does not set conflicting window flags (thanks @pionere!)
2022-11-16 17:40:32 -08:00
Sam Lantinga
02ab7f3745
Fixed release build using clang on Windows
2022-11-15 12:57:07 -08:00
Sam Lantinga
98f93d0aa1
Fixed building without xkbcommon support
2022-11-15 11:39:06 -08:00
Sam Lantinga
615901dbfe
Removed unnecessary header
...
The xkbcommon-keysyms.h header isn't available on some older systems,
and we don't actually need it for this code.
2022-11-15 11:19:08 -08:00
Sam Lantinga
70656b133c
Don't recreate the window when creating a Metal renderer on an OpenGL window.
...
It turns out that we can safely create a Metal view on an existing window, and that avoids issues with the window being recreated with the wrong orientation in iOS 16.
Fixes https://github.com/libsdl-org/SDL/issues/6289
2022-11-15 10:21:07 -08:00
Sam Lantinga
a40b7cde10
Workaround for views being in portrait instead of landscape mode on iOS 16
...
Fixes https://github.com/libsdl-org/SDL/issues/6289
2022-11-14 13:03:52 -08:00
Sam Lantinga
9f784b1887
The iOS and tvOS demos link SDL statically, not as a framework
2022-11-14 10:59:23 -08:00
Sam Lantinga
674989261d
Fixed warning
...
Fixes https://github.com/libsdl-org/SDL/issues/5842
2022-11-13 11:09:39 -08:00
Sam Lantinga
1b0277da61
Move SDL_mslibc.c into the source file list
2022-11-13 11:09:38 -08:00
Sam Lantinga
9f8b68a278
Fixed building without linux/input.h
...
https://github.com/libsdl-org/SDL/issues/6169
2022-11-11 10:25:52 -08:00
Sam Lantinga
b7e65a81f1
Fixed incorrect WGI controller state when the application loses focus
...
Recenter the controller elements when WGI stops reporting valid state
Fixes https://github.com/libsdl-org/SDL/issues/5261
2022-11-11 08:58:27 -08:00
Sam Lantinga
0dfc829a6b
Added simple BLE Steam Controller support on all platforms
...
This is still disabled by default via the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM
2022-11-10 19:17:04 -08:00
Sam Lantinga
f430ef5ddc
Don't change the window position when creating it on iOS, it is already placed on the correct display
2022-11-10 17:27:48 -08:00
Sam Lantinga
7c05ea0a0e
Added mappings for the GameSir T3 and T4 Pro controllers
2022-11-10 13:35:59 -08:00
Sam Lantinga
404cb27677
Added macOS mappings for the Nintendo Switch Pro Controller over Bluetooth
2022-11-10 13:28:03 -08:00
Sam Lantinga
6432f45a1c
Don't treat the Nintendo IMU as a separate game controller on Linux
2022-11-08 10:27:21 -08:00
Sam Lantinga
2e3b4f3fd7
Don't send rumble to the Amazon Luna controller on macOS
...
Sending rumble to the Amazon Luna controller on macOS gets there, but IOHIDDeviceSetReport() blocks for a long time and eventually fails.
This appears to be a bug in the macOS Bluetooth stack, ref rdar://99265496
2022-11-08 07:50:51 -08:00
Sam Lantinga
02bc359b64
Shorten "Bensussen Deutsch & Associates,Inc.(BDA)" to "BDA" for controller names
2022-11-07 19:31:18 -08:00
Sam Lantinga
c2675d74c5
Revert "cocoa: Discard the IME Candidate Window immediately when Escape is pressed"
...
This reverts commit 0d76e2a8a1 , as it introduced other issues:
https://github.com/libsdl-org/SDL/pull/6486#issuecomment-1304684865
2022-11-06 10:52:20 -08:00
Sam Lantinga
f2ce7c5fb2
Added the G29 as a PlayStation controller
2022-11-06 08:23:08 -08:00
Sam Lantinga
9d1dbd2ad8
Added note about trigger rumble availability across third-party Xbox One controllers
2022-11-06 01:16:52 -08:00
Sam Lantinga
e7a56323ab
Make sure we wait after sending the rumble packet when initializing the PowerA Xbox One Mini Wired Controller
2022-11-06 01:43:05 -07:00
Sam Lantinga
6875e62af3
Make sure we don't send Xbox controllers rumble so quickly that it overwhelms the firmware
...
Fixes https://github.com/libsdl-org/SDL/issues/6435
2022-11-06 01:15:20 -07:00
Sam Lantinga
38af459dd9
Fixed potential clobbering of packets of different types using SDL_HIDAPI_SendRumble()
2022-11-06 01:15:19 -07:00
Sam Lantinga
e45cb5b1e2
Fixed initializing the PowerA Xbox One Mini Wired Controller
2022-11-06 01:15:18 -07:00
Sam Lantinga
15a9890919
Added SDL_HINT_HIDAPI_IGNORE_DEVICES to specify devices that should be ignored in SDL_hid_enumerate()
2022-11-05 16:44:52 -07:00
Sam Lantinga
297ecb706d
Added SDL_strcasestr() for a case insensitive version of SDL_strstr()
2022-11-05 15:58:30 -07:00
Sam Lantinga
a4626dea8d
Fixed initializing the PDP Xbox One and Victrix Gambit controllers
2022-11-05 14:24:41 -07:00
Sam Lantinga
7e11b09b3b
The PowerA Xbox One Mini Wired Controller works with the HIDAPI driver now
2022-11-05 13:50:37 -07:00
Sam Lantinga
a2d66b6a91
SDL_GameControllerMapping() should return the string for the actual mapping that was used when opening a gamecontroller, rather than do a GUID match again
...
Also don't match against the zero guid if that happens to be in the mapping list for some reason
2022-11-05 13:12:10 -07:00
Sam Lantinga
24cdebe464
Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED to control the brightness of the Xbox button LED on the Xbox One controller
2022-11-05 10:34:08 -07:00
Sam Lantinga
33a68f575f
Added Linux mappings for the Logitech G29 in PS3 and PS4 modes
2022-11-03 16:02:58 -07:00
Sam Lantinga
c70e675900
Wait a bit for devices to initialize before trying to enumerate and open them.
...
This works around udev event nodes arriving before hidraw nodes and the controller being opened twice - once using the Linux driver and once by the HIDAPI driver.
This also fixes a kernel panic on Steam Link hardware due to trying to open the hidraw device node too early.
A delay of 10 ms seems to be a good value, tested on Steam Link hardware.
2022-11-03 12:37:54 -07:00
Sam Lantinga
b75d318776
Sometimes the HID open doesn't succeed immediately after being notified about the device
...
Tested on Steam Link hardware with the Nintendo Switch Pro controller, which will occasionally take 2 attempts to open.
2022-10-31 13:33:53 -07:00
Sam Lantinga
f6b1e028ab
Allow vendor matching for hid_enumerate() on all backends
2022-10-29 10:43:11 -07:00
Sam Lantinga
4556074e18
Re-set the maximize state if we were maximized while fullscreen
2022-10-29 09:35:07 -07:00
Sam Lantinga
ab06a307dc
Don't report windows being maximized when fullscreen on X11
...
This is a functional state for some window managers (tested using stock Ubuntu 22.04.1), and removing that state, e.g. using SDL_RestoreWindow(), results in a window centered and floating, and not visually covering the rest of the desktop.
2022-10-29 09:21:17 -07:00
Sam Lantinga
f500c14766
Fixed DirectFB build
2022-10-28 08:39:02 -07:00
Sam Lantinga
25d0473aad
Removed Razer Onza Tournament Edition mapping
...
The controller can use either hat or buttons for the D-Pad, depending on what Linux driver is in use. The automatic mapping in LINUX_JoystickGetGamepadMapping() will do the right thing based on the exposed capability bits.
I'm sure this is the case for other controllers as well, so we might be removing more mappings over time.
2022-10-25 16:14:26 -07:00
Sam Lantinga
e837debc25
Bindings should have a trailing comma, so the CRC can be appended
2022-10-25 16:13:50 -07:00
Sam Lantinga
b6cf889af4
Use ScreenCount() instead of SDL_GetNumVideoDisplays()
...
The limitation appears to be specific to multi-screen setups
2022-10-25 15:10:50 -07:00
Sam Lantinga
c74ea994a5
Added support for the Razer Raiju Tournament Edition controller in Bluetooth mode
2022-10-25 13:11:41 -07:00
Sam Lantinga
72f6e216dc
Disabled debug logging
2022-10-25 12:25:57 -07:00
Sam Lantinga
e3f5744db4
Don't use XIWarpPointer() on multi-display configurations
2022-10-25 12:14:00 -07:00
Sam Lantinga
da478d1f66
Fixed build
2022-10-25 10:30:56 -07:00
Sam Lantinga
a6018ae57f
Added support for the NVIDIA SHIELD controller v1.03 to the HIDAPI driver
2022-10-25 10:23:51 -07:00