Sam Lantinga
fd9a4eff9f
Updated GameInput device info to match other joystick drivers
2024-02-17 17:52:48 -08:00
Sam Lantinga
8f0f14c312
Added automatic gamepad mapping for the GameInput driver
2024-02-17 17:42:32 -08:00
Sam Lantinga
eb9a7d97f9
The GameInput driver handles Xbox controllers
...
Don't let the raw input driver handle them when GameInput is active
2024-02-17 17:42:23 -08:00
Sam Lantinga
698b7deaa2
Removed GAMEINPUT_JoystickEffectDataType_HapticFeedback
...
This refers to the HID Simple Haptics spec, which is currently only implemented by the Surface Dial accessory and WMR game controllers, which aren't currently exposed by the GameInput API.
We can add support for other effects in the future, but for now we don't need this or the SDL_gameinputjoystick_c.h header.
2024-02-17 16:33:45 -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
fee140bdfe
Added the option for GameInput support to the Win32 SDL build
...
GameInput is designed to be used by Win32 C applications, so no need to restrict it to the GDK build.
2024-02-17 14:07:42 -08:00
Nikita Krapivin
534f753e20
GameInput backend for SDL (Gamepad-only for now)
2024-02-17 11:33:51 -08:00
Sam Lantinga
814a94c349
Fixed error: unused variable 'axes' [-Werror,-Wunused-variable]
2024-02-12 11:18:11 -08:00
Sam Lantinga
42cdbf6b21
Explicitly retain and release NSObjects in C structures
...
Fixes https://github.com/libsdl-org/SDL/issues/9021
Fixes https://github.com/libsdl-org/SDL/issues/9042
2024-02-12 10:20:06 -08:00
Sam Lantinga
a538936821
Renamed SDL_HINT_LINUX_JOYSTICK_DEADZONES to SDL_HINT_JOYSTICK_LINUX_DEADZONES
2024-02-12 09:54:33 -08:00
Sam Lantinga
980c379a0b
Renamed SDL_HINT_LINUX_JOYSTICK_CLASSIC to SDL_HINT_JOYSTICK_LINUX_CLASSIC
2024-02-12 09:54:33 -08:00
Sam Lantinga
1f7936d545
Renamed SDL_HINT_LINUX_HAT_DEADZONES to SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES
2024-02-12 09:54:33 -08:00
Sam Lantinga
39cfb437ed
Renamed SDL_HINT_LINUX_DIGITAL_HATS to SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS
2024-02-12 09:54:33 -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
fd5d761128
Renamed SDL_HINT_DIRECTINPUT_ENABLED to SDL_HINT_JOYSTICK_DIRECTINPUT
2024-02-12 09:54:33 -08:00
Sam Lantinga
9ce7fe2848
Removed SDL_HINT_ACCELEROMETER_AS_JOYSTICK
...
Sensors are a first-class object in SDL and we haven't gotten any feedback that this feature is useful these days.
Closes https://github.com/libsdl-org/SDL/pull/7879
2024-02-12 09:54:33 -08:00
Sam Lantinga
cacac6cc34
Updated structure and field names for consistency
...
Type names are camel case and field names are snake case except for fields ending in id, which are capitalized.
Fixes https://github.com/libsdl-org/SDL/issues/6955
2024-02-11 08:27:56 -08:00
Sam Lantinga
3ebbf0f409
Guarded ElementAlreadyHandled with #ifdef ENABLE_PHYSICAL_INPUT_PROFILE (thanks @Donione!)
...
Fixes https://github.com/libsdl-org/SDL/issues/9033
2024-02-09 16:12:33 -08:00
Sam Lantinga
b7c61569f8
Redefine XINPUT_CAPABILITIES_EX as an SDL typedef
...
mingw-w64 has added this from Proton (which added this from SDL), so we need to re-define it as a local symbol to avoid conflicting with mingw-w64 headers.
Fixes https://github.com/libsdl-org/SDL/issues/9031
2024-02-09 01:26:45 -08:00
Sam Lantinga
26e947f8ea
Added VIDPID for OpenFFBoard wheel (thanks @groybe!)
...
Closes https://github.com/libsdl-org/SDL/pull/7987
2024-02-07 16:34:50 -08:00
Sam Lantinga
c79462dc50
Fixed Xcode build warnings
2024-02-06 12:29:44 -08:00
meyraud705
82d89ff4fb
Fix memory leak in SDL_UpdateSteamVirtualGamepadInfo()
2024-02-06 01:55:47 -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
Joshua Root
e0158f68e4
Fix SDL_mfijoystick build issues
...
Add missing guards around use of physicalInputProfile.
Add explicit import of Foundation which seems to be needed on some
systems to get the NSArray definition.
Add __unsafe_unretained to ObjC types in struct so the compiler doesn't
complain about that not being allowed with ARC.
Closes : #8979
2024-02-02 22:24:50 -08:00
Sam Lantinga
d04fea8b87
Even more miscellaneous gamepad buttons!
2024-02-01 20:34:05 -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
Sam Lantinga
b9ea2dde44
Added VisionOS as a supported target to the Xcode project
...
Also added SDL_PLATFORM_VISIONOS to the platform definitions and generally switched from TARGET_OS_* macros to SDL_PLATFORM_* macros.
2024-01-27 11:07:21 -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
fa5bfe577c
Fixed warnings building for UWP
2024-01-21 06:55:29 -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
1dbe54c4e6
Fixed warning C4244: 'function': conversion from 'SDL_ThreadID' to 'DWORD', possible loss of data
2024-01-19 06:28:54 -08:00
Sam Lantinga
464f4d19fe
Removed obsolete XInput mapping hint
2024-01-18 07:00:21 -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
f224af5ac5
Updated Haptic API for SDL 3.0 conventions
...
Also removed the XInput haptic support since using the haptic API for rumble is no longer supported.
2024-01-18 03:26:11 -08:00
Sam Lantinga
8ca9134115
Removed unnecessary NULL assignment
2024-01-18 03:26:11 -08:00
Sam Lantinga
52d6587084
Removed SDL_EVENTS_DISABLED
...
Events are a core part of the SDL API, and shouldn't be disabled
2024-01-17 09:24:04 -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
Sam Lantinga
e100992c17
Added mapping for the RX Gamepad, e.g. Pandora Box 7
...
Fixes https://github.com/libsdl-org/SDL/issues/8217
2024-01-06 06:18:13 -08:00
Sam Lantinga
7c5e694022
Ignore a new warning in Visual Studio 2022
2024-01-04 12:44:48 -08:00
Vicki Pfau
bec1b8f849
Add basic rumble support to Steam Deck
2024-01-01 21:46:38 -08:00
Sam Lantinga
87b8f09657
Fixed warning: no previous prototype for function 'SDL_PrivateGetGamepadButtonFromString' [-Wmissing-prototypes]
2024-01-01 14:56:55 -08:00
Sam Lantinga
5b3ee51c6c
Updated copyright for 2024
2024-01-01 13:15:26 -08:00
Sam Lantinga
423b1fafcd
Fixed warning C4047: 'function': '__x_ABI_CWindows_CGaming_CInput_CIRawGameController **' differs in levels of indirection from '__x_ABI_CWindows_CGaming_CInput_CIRawGameController *'
...
This warning happens with old and buggy versions of the Windows SDK
2023-12-29 18:07:30 -08:00
Sam Lantinga
9906d6d3bc
Fixed warning C4244: '=': conversion from 'SDL_bool' to 'Uint8', possible loss of data
2023-12-29 10:37:28 -08:00
Sam Lantinga
e813c72b3c
Fixed warning C4245: 'return': conversion from 'int' to 'SDL_JoystickID', signed/unsigned mismatch
2023-12-29 09:25:57 -08:00