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
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
Sam Lantinga
bb4ec5250f
Added support for non-gamepad controllers to the GameInput driver
2024-02-17 22:32:44 -08:00
Sam Lantinga
f63f99bd2d
Setup to handle the guide button once we get an updated GameInput SDK
2024-02-17 21:55:10 -08:00
Sam Lantinga
ae8a910781
Added infrastructure for reporting GameInput touchpads
...
PlayStation controllers don't seem to report touch info, so we'll need to figure out how to interpret the touch data once it's available.
2024-02-17 21:21:54 -08:00
Sam Lantinga
ae4aa25082
Get the real GameInput device name if possible
2024-02-17 20:12:46 -08:00
Sam Lantinga
419aebebda
Added infrastructure for reporting GameInput sensors
...
IGameInputReading::GetMotionState() isn't implemented yet, so we'll need to figure out how to interpret the motion data once it's available.
2024-02-17 20:12:46 -08:00
Sam Lantinga
85ac0381b7
IGameInputDevice::GetDeviceInfo() can never return a null pointer
...
The IGameInputDevice instance can't be internally instantiated without it, so it's always guaranteed to be present.
2024-02-17 20:12:14 -08:00
Sam Lantinga
fbe4153214
The HIDAPI driver takes precedence over the GameInput driver
...
The HIDAPI driver has more functionality for supported controllers.
2024-02-17 19:13:04 -08:00
Sam Lantinga
4a59b17de2
Added infrastructure for querying battery status for GameInput
2024-02-17 19:09:29 -08:00
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