Skip to content

Add more device test data

Simon McVittie requested to merge wip/smcv/test-evdev-heuristic into main

steamrt/tasks#287

  • build: Require GLib 2.58.x (from !725 (merged))

    We now have a backport of GLib 2.58.x in Steam public betas' version of Steam Runtime 1 'scout', and the same version is bundled with relocatable pressure-vessel releases.

    Users of build-aux/many-builds.py will need to run build-aux/many-builds.py deps to download the new scout release before they can continue to compile steam-runtime-tools.

  • tests/input-device: Handle known-failing _srt_evdev_capabilities_guess_type() calls

    Our heuristic to identify game controllers, which is essentially the same as SDL's, cannot distinguish between a 3-axis accelerometer or gyro (which is not a joystick) and 3-axis driving or simulation pedals (which are). Before we add test data for those, we should make sure we can skip those test-cases.

  • tests/input-device: Add devices described on steam-devices and Proton issues

    Origin: https://github.com/libsdl-org/SDL/pull/7597

  • tests/input-device: Clarify that some buttons are actually keyboard keys

  • tests/input-device: Note a functionally-equivalent device

    We don't need to re-test the heuristic with the same input data, but knowing that another device has equivalent evdev metadata is useful information to record. Thanks to Jeremy Whiting.

    Origin: https://github.com/libsdl-org/SDL/pull/7791

  • tests/input-device: Finish incomplete data for Switch Pro Controller via USB

    This didn't include any buttons, which I assume was because I transcribed them incorrectly rather than reflecting reality. Confirmed against another Switch Pro Controller on a more recent kernel (thanks to Jeremy Whiting).

    Origin: https://github.com/libsdl-org/SDL/pull/7791

  • tests/input-device: Add test data for another Switch Pro Controller

    A newer evemu-describe transcript has this same controller with its buttons mapped differently, presumably a result of driver changes in the Linux kernel. Either way, we should recognise it as a gamepad. Thanks to Jeremy Whiting.

    Origin: https://github.com/libsdl-org/SDL/pull/7791

  • tests/input-device: Add Google Stadia controller

    This is a bit unusual because it has a small number of what would ordinarily be keyboard keys. Thanks to Jeremy Whiting for recording this.

    Origin: https://github.com/libsdl-org/SDL/pull/7791

  • tests/input-device: Add test data for Microsoft Xbox Series S|X Controller

    Like the Stadia controller, this is unusual because it represents the Share button as the Record key from a multimedia keyboard (as of Linux 6.2.11 with the xpad driver). Thanks to Jeremy Whiting.

    Origin: https://github.com/libsdl-org/SDL/pull/7791

  • tests/input-device: Add test data for Nintendo Switch Joy-Cons via Bluetooth

    Thanks to Jeremy Whiting.

    Origin: https://github.com/libsdl-org/SDL/pull/7791

  • tests/input-device: Expand test data for a DualSense (PS5) gamepad

    Also make details of PS4 gamepads (which are very similar from an evdev point of view) more specific.

    Thanks to Jeremy Whiting for recording these.

    Origin: https://github.com/libsdl-org/SDL/pull/7791

  • tests/input-device: Describe several equivalent devices

    https://github.com/ValveSoftware/steam-devices/pull/34 lists several more devices that are functionally equivalent to this one from the point of view of their evdev metadata. Thanks to apgrc.

    Origin: https://github.com/libsdl-org/SDL/pull/7791

  • tests/input-device: Add details of some more 8BitDo devices

    Thanks to Jeremy Whiting.

    Origin: https://github.com/libsdl-org/SDL/pull/7791

  • tests/input-device: Add test data for X-Box One Elite 2

    Another day, another gamepad, another incompatible button mapping!

    Origin: https://github.com/libsdl-org/SDL/pull/7815
    Origin: https://github.com/libsdl-org/SDL/pull/7826

  • tests/input-device: Verify most Wii devices against real hardware

    Some of the test data previously seen here was guessed from kernel source code, and not all of it was correct. The following devices have now been verified against evemu-describe output with Linux 6.3 (thanks to Jeremy Whiting for collecting this):

    • basic Wiimote
      • buttons
      • 3-axis accelerometer
      • infra-red sensor for Sensor Bar location (precise aim)
    • Motion Plus accessory (3-axis gyroscope)
    • Nunchuck accessory (joystick, 2 buttons, second 3-axis accelerometer)
    • Classic Controller accessory (a complete traditional gamepad)

    Origin: https://github.com/libsdl-org/SDL/pull/7816

  • tests/input-device: Try to correct Wii devices guessed from kernel source

    The comments here disagreed with the actual bytes. According to https://elixir.bootlin.com/linux/v6.3.7/source/drivers/hid/hid-wiimote-modules.c, the Balance Board reports BTN_A and ABS_HAT0X, HAT0Y, HAT1X and HAT1Y. This means the comments here were correct, but the .abs bits shown were in the wrong byte.

    Matching the Wii U Pro Controller against the same kernel source, it appears to be correct: it's the same representation as a PS3 gamepad, except that it lacks the Z and RZ axes for analogue triggers.

    Origin: https://github.com/libsdl-org/SDL/pull/7816

  • tests/input-device: Add details of another driving simulation controller

    Thanks to Ben Fradella.

    Origin: https://github.com/libsdl-org/SDL/pull/7828

  • tests/input-device: Add raw HID report descriptors where available

    We don't currently use these in our device-classification heuristic, but it could be a useful input in future.

    Thanks to Sam Lantinga, Ben Fradella, kevenwyld and schlegp for providing some of these.

    Origin: https://github.com/libsdl-org/SDL/pull/7833
    [Also includes subsequent fixes for unreferenced globals]
    Origin: https://github.com/libsdl-org/SDL/pull/10110

  • tests/input-device: Correct typo in bus type for Xbox Series S|X via Bluetooth

    All Bluetooth devices are bus type 0x0005.

    Origin: https://github.com/libsdl-org/SDL/pull/7833

  • tests/input-device: Add some EVIOCGNAME and USB name strings to test data

    We don't currently use these for anything, but we might start using them as input to our heuristics as part of libsdl-org/SDL#7697.

    Origin: https://github.com/libsdl-org/SDL/pull/7833

  • tests/input-device: Add some more laptop built-in devices

    Origin: https://github.com/libsdl-org/SDL/pull/7833

  • tests/input-device: Add a comment about PS5 gamepads

    They report C/Z buttons but don't physically have them.

  • tests/input-device: 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.

    Origin: https://github.com/libsdl-org/SDL/pull/7837

  • tests/input-device: Add artificial test data for deriving type from evdev properties

    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.

    Origin: https://github.com/libsdl-org/SDL/pull/7837

  • tests/input-device: Add some examples of PDP third-party Switch controllers

    Thanks: Ravi Kanodia
    Origin: https://github.com/libsdl-org/SDL/pull/7962

  • tests/input-device: Add a field for the USB device version

    For some devices, such as the Steam Deck's built-in Steam Controller, the version number reported via evdev and the version number reported via USB are different. We don't currently use this information anyway, but in case we want to use it in the future, let's include it in our test data.

    Origin: https://github.com/libsdl-org/SDL/pull/10078

  • tests/input-device: Add test data from Steam Deck built-in devices

    Thanks: Robert Beckett
    Origin: https://github.com/libsdl-org/SDL/pull/10078

  • tests/input-device: Add the virtual X360 controller created by Steam Input

    Thanks: Robert Beckett
    Origin: https://github.com/libsdl-org/SDL/pull/10078

  • tests/input-device: Add missing device ID for Wiimote Classic Controller

    Thanks: Jeremy Whiting
    Origin: https://github.com/libsdl-org/SDL/pull/10077

  • tests/input-device: Add X-Box One S controller via xpadneo 0.9.x

    This is an out-of-tree driver providing an alternative interface to X-Box gamepads. Compared with the in-kernel driver, it adds four pseudo-buttons used to indicate which profile is active, and an optional "misc" axis that combines the two triggers into a rudder.

    Thanks: kakra
    Origin: https://github.com/libsdl-org/SDL/pull/10076

Edited by Simon McVittie

Merge request reports