Sam Lantinga
01541bc350
Added support for the HORIPAD Pro for Xbox Series X
2022-11-30 16:42:00 -08:00
Sam Lantinga
4504c10f3b
Re-enabled support for third party PS3 controllers
2022-11-30 16:37:20 -08:00
Sam Lantinga
7b1000013e
Reverted code formatting for Apple platforms
...
We didn't get the merge right, and rather than tease out exactly what happened, I'm just reverting for now.
2022-11-30 15:51:17 -08:00
Sam Lantinga
9e997cc787
Fixed Victrix FS Pro V2 controller hang on reboot
2022-11-30 15:39:10 -08:00
Sam Lantinga
d87048fd5a
Fixed crash if GetRectDisplayIndex() is called before SDL_VideoInit()
2022-11-30 14:37:34 -08:00
Sam Lantinga
6926d046c0
Fixed build after cherry-pick of 5750bcb174 from SDL3
2022-11-30 13:05:57 -08:00
Sam Lantinga
b8d85c6939
Update for SDL3 coding style ( #6717 )
...
I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base.
In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted.
The script I ran for the src directory is added as build-scripts/clang-format-src.sh
This fixes:
#6592
#6593
#6594
(cherry picked from commit 5750bcb174 )
2022-11-30 12:57:41 -08:00
Sam Lantinga
5c4bc807f7
Revert "SDL_test_md5.h: fix MD5UINT4 type to be really 32 bits."
...
This reverts commit 8eeca8c7db as it's potentially an ABI break.
2022-11-30 05:59:56 -08:00
Sam Lantinga
2d24baaad4
Fixed building on Windows with SDL_VIDEO=OFF
...
Fixes https://github.com/libsdl-org/SDL/issues/6562
2022-11-29 09:26:29 -08:00
Sam Lantinga
b7cc4dce70
Fixed bug #6698 - VISA: wrong check sceKernelPollSema
...
(cherry picked from commit f077c69193 )
2022-11-29 08:51:23 -08:00
Sam Lantinga
89e9f7b42b
Added support for the Xbox Elite controller paddles with firmware version 5.13+
2022-11-28 23:10:02 -08:00
Sam Lantinga
37d244ea81
Added support for the 8BitDo Ultimate Wired Controller in DirectInput mode, including the misc button and paddles
2022-11-28 14:49:07 -08:00
Sam Lantinga
a937b5c4ad
Add 8BitDo to the list of Xbox 360 third party vendors
...
Allows detection of the 8BitDo Ultimate Wired Controller
2022-11-28 13:47:30 -08:00
Sam Lantinga
8fddf146bf
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:26 -08:00
Sam Lantinga
dce6ed56d7
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.
2022-11-22 10:56:44 -08:00
Sam Lantinga
e3d430b83e
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.
2022-11-22 10:53:28 -08:00
Sam Lantinga
938b720a9e
Update SDL info and Xcode marketing version to 2.27.0
2022-11-22 09:19:21 -08:00
Sam Lantinga
44975d40ef
Update SDL info and Xcode marketing version with version update scripts
2022-11-22 09:18:05 -08:00
Sam Lantinga
ea8f8b6dc3
Updated to version 2.27.0 for development
2022-11-21 16:36:10 -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
Sam Lantinga
dd72f3f03d
Added comment for #endif
2022-10-24 10:37:43 -07:00
Sam Lantinga
f4d1f5ed54
SDL-HIDPS4: fix PS4 Slim controller over BT - it sends the same input report as the it does over USB, but with a larger packet size
...
CR: saml
2022-10-23 16:35:36 -07:00
Sam Lantinga
5bd13dec19
Merge commit '8db3a33872cfbefcdfb059beea92338a7873f89e' into main
2022-10-23 16:35:22 -07:00
Sam Lantinga
e6742d05f1
Merge commit '413500ab69d9ac288a73946073d4414376ca17d2' into main
2022-10-23 16:35:20 -07:00
Sam Lantinga
5373ad6ffb
Merge commit '2ebaafa6c9334071b664b15d045656250690dd96' into main
2022-10-23 16:35:18 -07:00
Sam Lantinga
7acab50453
Merge commit 'c3b13346e0a2200f1521cf064b9a602c8196e6a6' into main
2022-10-23 16:35:15 -07:00
Sam Lantinga
f07673a12e
Merge commit 'd4d99e8c29da350379c991a8360d544d2c9eaa32' into main
2022-10-23 16:35:13 -07:00
Sam Lantinga
d41fb3c480
Merge commit 'cfd5d8eb29c8958de3333632a96032d3481816e5' into main
2022-10-23 16:35:11 -07:00
Sam Lantinga
9c7b9e08b3
Merge commit '4ca5ea5b7e8333b2cde1b7cdddf167c67cc3f23c' into main
2022-10-23 16:35:09 -07:00
Sam Lantinga
8696350903
Merge commit '2dc788cb9ffa83a2840e62f5ad2d0a7055cfcb19' into main
2022-10-23 16:35:07 -07:00
Sam Lantinga
e45ef5a6c0
Merge commit '5b8f830e342b296d255969bbaec5a1a3522f1083' into main
2022-10-23 16:35:05 -07:00
Sam Lantinga
491d594976
Merge commit '0e1d19cf680fc51635b3c52a9afa33fe03881bb5' into main
2022-10-23 16:35:03 -07:00
Sam Lantinga
26c9620a63
Merge commit 'a905a7869f18332579ff06ba3f7f3777708a3007' into main
2022-10-23 16:35:01 -07:00
Sam Lantinga
e738cf80dc
Merge commit '65a38a4015e54add093bdb3fbd2ad1cdc1770c72' into main
2022-10-23 16:34:59 -07:00
Sam Lantinga
da4c97250a
Merge commit '3f1b5efccaa727745b335b546a42bd650694ca08' into main
2022-10-23 16:34:57 -07:00
Sam Lantinga
b3ba8f4065
Merge commit '3d415bc5d61e625189ccca6348ff1b70c469e45c' into main
2022-10-23 16:34:55 -07:00
Sam Lantinga
2d3e21ab0e
Merge commit 'f37db957f8c5d9de53bdd58b2a95a2da0937307d' into main
2022-10-23 16:34:52 -07:00
Sam Lantinga
8047ece180
Merge commit '5ed091c12d4edefb366d78217b72cb75b563bfcd' into main
2022-10-23 16:34:50 -07:00
Sam Lantinga
ef62b767f9
Merge commit '0823b5973a28ebad2ca6d34058c12602bc8a69f0' into main
2022-10-23 16:34:48 -07:00
Sam Lantinga
e5fe522194
Merge commit '4264c0b67469896fced5ba8ac4c0e75acbb13ff1' into main
2022-10-23 16:34:46 -07:00