Commit Graph

38 Commits

Author SHA1 Message Date
Sam Lantinga
9f984e6fb4 testcontroller: fixed showing analog axis values 2024-06-12 22:27:54 -07:00
Sam Lantinga
80a907e0e6 Backed out the viewport and cliprect changes in 9fb5a9ccac
This ended up being lots of application code churn without any real benefit in practice.
2024-06-12 19:25:15 -07:00
Sam Lantinga
9fb5a9ccac Use floating point values for viewport, clip rectangle, and texture sizes
These are integer values internally, but the API has been changed to make it easier to mix other render code with querying those values.

Fixes https://github.com/libsdl-org/SDL/issues/7519
2024-06-12 10:18:39 -07:00
Sam Lantinga
2461bd8648 Removed unnecessary float casts 2024-05-23 15:12:19 -07:00
Sam Lantinga
c1ba31118b Added ball, touchpad, and sensor support for virtual joysticks
Fixes https://github.com/libsdl-org/SDL/issues/9542
2024-05-09 18:25:22 -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
Ryan C. Gordon
fc7afa9cbf
rwops: Renamed SDL_RWops to SDL_IOStream, and other related symbols. 2024-03-14 19:38:12 -04: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
5b3ee51c6c Updated copyright for 2024 2024-01-01 13:15:26 -08:00
Sam Lantinga
57e5c7f6ee We'll just use the legacy names for face buttons in the mappings
This fixes being able to accidentally rebind the face buttons in testcontroller
2023-11-15 22:09:09 -08:00
Sam Lantinga
f66f61de01 Fixed missing "0" in the button list 2023-11-11 08:30:13 -08:00
Sam Lantinga
a5a47d3bee Fixed crash if there is no controller mapping 2023-11-10 16:39:32 -08:00
Sam Lantinga
2991b9f6ac SDL now represents gamepad buttons as positional elements with a separate label
This gives applications and binding systems a clearer view of what the hardware is so they can make intelligent decisions about how to present things to the user.

Gamepad mappings continue to use abxy for the face buttons for simplicity and compatibility with earlier versions of SDL, however the "SDL_GAMECONTROLLER_USE_BUTTON_LABELS" hint no longer has any effect.

Fixes https://github.com/libsdl-org/SDL/issues/6117
2023-11-10 12:21:43 -08:00
Sylvain
d8600f717e Pointer as bool (libsdl-org#7214) 2023-11-09 14:18:36 -08:00
Simon McVittie
efe15588d5 Relabel back paddles as left or right
The sequence order of the four paddles is not obvious, with SDL and Xbox
controllers swapping the order of P2 and P3 relative to each other.
If we group them into left and right, then it becomes more obvious.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-09 11:03:30 -07:00
Sam Lantinga
255f297439 Fixed crash if SetMappingValue() is passed a NULL key 2023-07-19 09:23:08 -07:00
Sam Lantinga
b271e92c6e Added the ability to specify a gamepad type in the mapping
Also renamed most cases of SDL_GAMEPAD_TYPE_UNKNOWN to SDL_GAMEPAD_TYPE_STANDARD, and SDL_GetGamepadType() will return SDL_GAMEPAD_TYPE_UNKNOWN only if the gamepad is invalid.
2023-07-17 12:59:56 -07:00
Sam Lantinga
57820071a4 Added the ability to rename your controller 2023-07-16 15:57:32 -07:00
Sam Lantinga
8f21be87fc Allow using A and B to navigate the controller binding flow 2023-07-16 15:57:32 -07:00
Sam Lantinga
f3fe579cf0 Sort the entries in the controller mapping 2023-07-16 15:57:32 -07:00
Sam Lantinga
787786bdbc testcontroller: memory management cleanup
Also saved the guide button for last in the binding flow, since it may not be present on the controller or available from the OS
2023-07-16 15:57:32 -07:00
Sam Lantinga
1a4995371b Use light text for button labels so they show up well over the activity highlight 2023-07-16 04:32:12 -07:00
Sam Lantinga
ae0fce3f01 testcontroller: show face button labels over the activity highlight 2023-07-16 04:32:12 -07:00
Sam Lantinga
d90b938f0f Additional work on binding mode for testcontroller 2023-07-16 04:32:12 -07:00
Sam Lantinga
404e030b39 Added binding mode to testcontroller 2023-07-16 04:32:12 -07:00
Sam Lantinga
cd99ae47ef Improved button labels, based on controller style 2023-07-16 04:32:12 -07:00
Sam Lantinga
ee34805053 Added ABXY button labels to the gamepad image 2023-07-16 04:32:12 -07:00
Sam Lantinga
e674d81844 Show the gamepad bindings in testcontroller 2023-07-16 04:32:12 -07:00
Sam Lantinga
34876c390f testgamepad works for joysticks as well as gamepads 2023-07-16 04:32:12 -07:00
Sam Lantinga
4feb2f4b1a Added a button to copy the gamepad mapping to the clipboard 2023-07-11 10:20:08 -07:00
Sam Lantinga
2e3404db01 Added SDL_GetGamepadPowerLevel() to get the power level directly from a gamepad 2023-07-11 10:20:08 -07:00
Sam Lantinga
30a9fffbd4 Fixed array out of bounds access 2023-07-10 22:08:12 -07:00
Sam Lantinga
8ba850bef2 Show battery status on screen in testgamepad 2023-07-10 20:29:09 -07:00
Sam Lantinga
50277a0355 Show touchpad and sensor output on screen in testgamepad 2023-07-10 18:05:31 -07:00
Sam Lantinga
d44ada59fb Added joystick and gamepad element display in testgamepad 2023-07-10 17:06:42 -07:00
Sam Lantinga
4a53dc5b8d Added touchpad visualization for testgamepad 2023-07-10 11:36:32 -07:00
Sam Lantinga
8f5ec2f596 Added shared code between testgamepad and gamepadmap
The goal is to eventually create a single program that can do mapping and testing of game controllers.
2023-07-09 19:24:36 -07:00