Commit Graph

898 Commits (f3fe579cf094a4f0bd255b12699f2482cca3d464)

Author SHA1 Message Date
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
Anonymous Maarten 87ccb886fe cmake: remove ability to build tests as a standalone project 2023-07-16 20:22:41 +02:00
Anonymous Maarten 80da0cf06d cmake: convert bmp images to c headers using python script
A pure CMake script was too slow
2023-07-16 16:31:06 +02: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 505a8dfb15 testcontroller replaces gamepadmap 2023-07-16 04:32:12 -07:00
Sam Lantinga 8296242f2e We don't need to be verbose about gamepad events now that we can visualize them 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 57cfd1e106 Removed SDL_GAMEPAD_TYPE_VIRTUAL, SDL_GAMEPAD_TYPE_AMAZON_LUNA, SDL_GAMEPAD_TYPE_GOOGLE_STADIA, and SDL_GAMEPAD_TYPE_NVIDIA_SHIELD
Removing SDL_GAMEPAD_TYPE_VIRTUAL allows a virtual controller to emulate another gamepad type. The other controller types can be treated as generic controllers by applications without special glyph or functionality treatment.
2023-07-16 04:32:12 -07:00
Sam Lantinga 689555a400 Added gamepad BMP files used as sources for the header files 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 6c2472d459 Relicensed testutils to match other test code
Permission granted in 76a7b629bf (commitcomment-121408342)
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 ca492dff18 Renamed testgamepad to testcontroller
The program does more than just test gamepads, and will eventually map them as well.
2023-07-16 04:32:12 -07:00
Sam Lantinga d2d26c7b1e testgamepad replaces testjoystick 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 fdff3b16d6 Fixed build 2023-07-11 10:44:57 -07:00
Sam Lantinga 45cd4b8038 Added button background 2023-07-11 10:26:22 -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 9885f4d245 Reduced the size of the gamepad front and back images 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 5b9f2d0942 Fixed build 2023-07-10 19:41:45 -07:00
Sam Lantinga e425fdd416 Added the controller name and info to the testgamepad window
Also added instructions for using the Virtual Controller
2023-07-10 19:13:51 -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 5ce967a579 Apply the display content scale to the gamepad test window 2023-07-10 09:37:20 -07:00
Simon McVittie 8b12585e1d testevdev: Add some examples of PDP third-party Switch controllers
Thanks: Ravi Kanodia
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-07-10 08:59:18 -07:00
Sam Lantinga efd530827a Return from main() instead of calling exit() 2023-07-09 20:42:00 -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
Sam Lantinga 1528e7c3c9 Fixed mapping a controller other than the first one 2023-07-06 12:36:26 -07:00
Sam Lantinga f4bd17deee Fixed %p formatting when there is following text 2023-07-06 08:04:20 -07:00
Sam Lantinga c1b11ad54e Expanded automated clipboard tests 2023-07-05 20:06:59 -07:00
Sam Lantinga c63aa9545e Fixed printf formatting for "%p" and added a unit test to check it 2023-07-05 20:06:59 -07:00
Sam Lantinga 35876da3c4 Clipboard data API revamp
The clipboard data API is now supported on all platforms, at least for internal use.
2023-07-05 20:06:59 -07:00
Sam Lantinga 00fc50557e Make sure logical presentation is complete before destroying the logical render target
Fixes "testautomation --filter render_testLogicalSize"
2023-07-03 18:29:48 -07:00
Sam Lantinga 3bd5e5ca3c Removed spurious casts 2023-07-03 16:18:33 -07:00
luzpaz 65e1d568ef Fix various typos (docs/build scripts/tests) 2023-07-03 08:35:37 -07:00
Sam Lantinga e264bb5178 Rename SDL_PIXELFORMAT_RGB888 and SDL_PIXELFORMAT_BGR888 to SDL_PIXELFORMAT_XRGB8888 and SDL_PIXELFORMAT_XBGR8888 for clarity
Fixes https://github.com/libsdl-org/SDL/issues/7903
2023-07-01 17:58:34 -07:00
Sylvain 1827a0bf62 Remove some use of C runtime functions in testevdev 2023-06-23 11:08:08 +02:00
Sam Lantinga 6306ee9f42 List the available haptic devices in testhaptic 2023-06-20 09:33:59 -07:00
Ozkan Sezer e4f53e6b21 testevdev.c: comment out two unused data to fix build. 2023-06-17 01:01:10 +03:00
Simon McVittie d584592822 linux: If the kernel specifically tells us the device type, trust it
If a device is positively identified as an accelerometer, pointing stick
or clickpad, then we don't need to second-guess it.

In practice this does not change the result for any device in our
test data, so add some artificial records that exercise this.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-06-16 08:54:41 -07:00
Simon McVittie 0d5aa70e62 linux: Pass evdev properties when guessing device type
In newer kernels, devices that can be positively identified as a
particular device type (for example accelerometers) get a property
bit set. Plumb this information through into the function, but don't
use it for anything just yet.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-06-16 08:54:41 -07:00
Simon McVittie a4ce721d7a testevdev: Allow device properties to be fully populated
The props array was too small for the highest property bits to be set,
although in practice this didn't matter since only the lower-order bits
have a meaning. Make it consistent with all the others.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-06-16 08:54:41 -07:00