Sam Lantinga
6821fb2fe4
Fixed the right trigger on the Nintendo SNES Controller in simple report mode
2024-06-13 11:35:29 -07:00
Sam Lantinga
a3cc900157
Fixed Nintendo Switch triggers when in simple report mode
2024-06-13 11:25:27 -07:00
Sam Lantinga
bf27269952
Re-enable full controller reports for Joy-Con controllers
...
When they are in simple report mode, the thumbstick gets turned into a digital hat, so let's use them in full report mode.
2024-06-12 23:36:16 -07:00
Sam Lantinga
6619de8f24
Try to guess the type of a Nintendo Switch controller if we can't read the device info
2024-06-12 23:22:44 -07:00
Sam Lantinga
5ee9a840b1
Ignore spurious reply packets when reading Nintendo Switch controller reports
2024-06-12 23:03:50 -07:00
Sam Lantinga
fcd2a3a6ad
Fixed mapping for Joy-Con controllers in simple report mode
2024-06-12 22:28:47 -07:00
Sam Lantinga
b2ccfc0b6f
Log whether a controller is Bluetooth or not
2024-06-12 17:22:52 -07:00
Sam Lantinga
3e70376bce
Enabled HIDAPI debug logging for diagnostic purposes
2024-06-12 15:03:41 -07:00
Anonymous Maarten
32907a9606
Rename SDL_Swap(16|32|64)(LE|BE) to SDL_Swap(LE|BE)(16|32|64)
2024-06-12 02:29:39 +02:00
Sam Lantinga
b6d7adfec1
Fixed PlayStation detection interrupting input for the Logitech K400 keyboard
...
Also added the Logitech Chillstream to the list of PS3 controllers and fixed the right shoulder axis.
2024-06-05 19:11:10 -07:00
Sam Lantinga
470cfc2755
Make sure we set the initial report interval value
2024-06-04 07:47:34 -07:00
meyraud705
4c9a91b62e
Update gamepad sensor rate
...
SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL allows to change sensor rate. Make SDL_GetGamepadSensorDataRate() returns the updated value.
2024-06-04 07:38:48 -07:00
Sam Lantinga
b0e93e4e63
Prevent crashes if freed objects are passed to SDL API functions
...
Instead of using the magic tag in the object, we'll actually keep track of valid objects
Fixes https://github.com/libsdl-org/SDL/issues/9869
Fixes https://github.com/libsdl-org/SDL/issues/9235
2024-06-03 08:54:46 -07:00
Sam Lantinga
e3beaa1972
Added support for the Razer Kitsune in PS5 mode
2024-05-31 15:18:15 -07:00
Ryan C. Gordon
0ec716819e
thread: Reworked SDL_CreateThread to be consistent across platforms.
...
Also documented missing and weird bits, rename typedefs to fit SDL standards.
2024-05-22 11:39:43 -04:00
Sam Lantinga
c24f860c4d
Fixed warning C4244: '=': conversion from 'int' to 'Uint8', possible loss of data
2024-05-16 11:28:02 -07:00
Sam Lantinga
abfd0dc683
Added SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL
2024-05-16 11:23:29 -07:00
Sam Lantinga
a87fa020ac
Don't enable enhanced report mode for Bluetooth Nintendo Switch controllers by default
...
This breaks applications using them in DirectInput mode, which isn't worth just getting battery status. We'll turn on enhanced mode if the application enables sensors.
2024-05-10 12:17:28 -07:00
Ozkan Sezer
e909c0360f
remove most of SDL_OutOfMemory() calls where SDL is the allocator.
...
Since commit 447b508a77 , SDL_malloc,
SDL_calloc, and SDL_realloc already calls SDL_OutOfMemory().
2024-05-08 20:00:50 +03:00
Sam Lantinga
85b7f131b0
Fixed warning C4701: potentially uninitialized local variable 'percent' used
2024-04-01 14:27:19 -07:00
Sam Lantinga
8847b35244
Separate joystick power state into battery status and percentage
...
This allows you to see battery percentage while the controller is charging
2024-04-01 13:59:00 -07:00
Marcel Hild
67e425bcf8
Add support for MadCatz Saitek Side Panel Control Deck
...
Signed-off-by: Marcel Hild <hild@b4mad.net >
2024-03-22 09:15:39 -07:00
Sam Lantinga
41e187be4f
Adjust Steam button names to match SDL
2024-03-15 16:05:19 -07:00
Sam Lantinga
53e86be22f
Minor cleanup with the new PS3 driver for windows
2024-03-10 20:12:11 -07:00
Riccardo Marcangelo
6534029691
Add DualShock 3 HIDAPI support on Windows ( #9144 )
...
This adds HIDAPI support for DualShock 3 controllers on Windows, addressing the current absence of this feature in SDL. To utilize this functionality, the official Sony driver 'sixaxis.sys' must be installed. HID offers several advantages over DirectInput, including rumble support and the ability to control the LED lights that display the controller number.
2024-03-10 20:08:36 -07:00
Sam Lantinga
e3cf2e4794
Turn HIDAPI joystick support off by default on mobile platforms
...
On Android, HIDAPI prompts for permissions and acquires exclusive access to the device, and on Apple mobile platforms it doesn't do anything except for handling Bluetooth Steam Controllers.
Fixes https://github.com/libsdl-org/SDL/issues/9241
2024-03-10 15:00:49 -07:00
Sam Lantinga
33eaddc565
Cleaned up various type conversion issues
...
This makes sure SDL_PixelFormatEnum flows through the internal code correctly, as well as fixing a number of other minor issues.
2024-03-07 06:58:43 -08:00
Sam Lantinga
f35ede7281
Generalized the idea of joystick driver priority
...
Joystick drivers are sorted by priority in the driver list, and higher priority drivers report whether they are handling a device when lower priority drivers want to add it to their device list.
This has been handled ad-hoc with the Windows and HIDAPI drivers, but this formalizes the idea and makes sure that GameInput has the highest priority of the Windows drivers.
2024-02-17 16:06:07 -08:00
Sam Lantinga
b557c15bcf
Renamed SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE to SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE
2024-02-12 09:54:33 -08:00
Sam Lantinga
cb811ba463
Fixed warning C4366: The result of the unary '&' operator may be unaligned
2024-02-03 11:49:15 -08:00
Sam Lantinga
cb70e972e3
Added miscellaneous gamepad buttons for additional macro buttons on some controllers
2024-02-01 20:15:01 -08:00
Sam Lantinga
f66fe7e221
Replaced SDL_GetJoystickCaps() with joystick properties
...
Fixes https://github.com/libsdl-org/SDL/issues/8927
2024-01-27 15:11:52 -08:00
Ningyuan Li
d6ebbc2fa4
mayflash adapter PS4 support
2024-01-24 19:25:35 -08:00
Ozkan Sezer
6b3b7c7d4b
SDL_hidapi_ps3.c: adjust for new SDL_PLATFORM_WINDOWS meaning.
2024-01-24 21:20:50 +03:00
Anonymous Maarten
31d133db40
Define SDL_PLATFORM_* macros instead of underscored ones ( #8875 )
2024-01-24 01:40:51 +00:00
Sam Lantinga
cd231a65f6
Added SDL_GetJoystickCaps() and SDL_GetGamepadCaps() to get the capabilities of controllers
...
Also added SDL_GAMEPAD_CAP_PLAYER_LED to let the application know if the controller has a visible player LED
2024-01-22 19:23:42 -08:00
Sam Lantinga
aa3fc6e904
Fixed D-pad on Xbox One controllers using the HIDAPI driver
2024-01-19 11:43:01 -08:00
Sam Lantinga
a2665f54c8
Updated the atomic API for SDL 3.0 naming conventions
...
Fixes https://github.com/libsdl-org/SDL/issues/7388
2024-01-18 04:41:34 -08:00
Sam Lantinga
6407e0cc37
Added attribution for GIP protocol handling (thanks @medusalix!)
2024-01-09 11:43:12 -08:00
Sam Lantinga
d3daba791a
Don't try to send the PS third-party feature request to the Logitech G815 keyboard
...
Fixes https://github.com/libsdl-org/SDL/issues/8373
2024-01-06 08:29:01 -08:00
Vicki Pfau
bec1b8f849
Add basic rumble support to Steam Deck
2024-01-01 21:46:38 -08:00
Sam Lantinga
5b3ee51c6c
Updated copyright for 2024
2024-01-01 13:15:26 -08:00
Sam Lantinga
dce626f469
Fixed warning C4244: 'function': conversion from 'int' to 'Uint16', possible loss of data
2023-12-29 09:24:52 -08:00
Sam Lantinga
7f376277e5
Fixed warning C4244: 'initializing': conversion from 'SDL_bool' to 'Uint8', possible loss of data
2023-12-29 09:24:22 -08:00
Sam Lantinga
70ba3f2830
Report the D-Pad for HIDAPI gamepads as a hat
...
This makes it easier for games that don't use the gamepad API to handle D-Pad navigation, and is consistent with many other non-HIDAPI mappings.
Fixes https://github.com/libsdl-org/SDL/issues/8754
2023-12-28 14:14:51 -08:00
Sam Lantinga
c3d84c3342
Record the initial input report mode and only restore simple mode if that's what we started with
...
Fixes https://github.com/libsdl-org/SDL/issues/8108
Closes https://github.com/libsdl-org/SDL/pull/8115
2023-12-24 08:12:14 -08:00
Sam Lantinga
1f1ee6f77c
Use the original manufacturer and product strings for the joystick CRC
...
This allows the most information possible for the CRC string, which is used to differentiate controllers with the same VID/PID.
Fixes https://github.com/libsdl-org/SDL/issues/8724
2023-12-20 19:22:37 -08:00
Sam Lantinga
72c366bf3d
Fixed whitespace
2023-12-20 11:06:34 -08:00
Sam Lantinga
c981a597dc
Added Steam Input API support for game controllers
...
Added support for getting the real controller info, as well as the function SDL_GetGamepadSteamHandle() to get the Steam Input API handle, from the virtual gamepads provided by Steam.
Also added an event SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED which is triggered when a controller's API handle changes, e.g. the controllers were reassigned slots in the Steam UI.
2023-12-20 10:40:28 -08:00
Vicki Pfau
a8f4f40d08
Sync more Steam Controller header definitions for the Steam Deck
2023-12-19 20:18:37 -08:00