Skip to content

Conversation

@twhitehead
Copy link
Contributor

The udev container issue is mostly to do with device notifications and netlink. The device classification stuff just pokes file in /sys and /run/udev. Doesn't hurt to try it first for classifying joysticks and then fall to the guess heuristics if it fails.

@slouken this is #8645 cherry picked for main. I was unable to test it beyond comparing the diffs and just verifying it builds okay as the sdl-jtest program does not build against head.

@twhitehead twhitehead changed the title Try SDL_UDEV_deviceclass to detect joysticks even if in a container Try SDL_UDEV_deviceclass to detect joysticks even if in a container (pull request for main) Dec 25, 2023
The udev container issue is mostly to do with device notifications
and netlink. The device classification stuff just pokes file in /sys
and /run/udev. Doesn't hurt to try it first for classifying joysticks
and then fall to the guess heuristics if it fails.
@slouken slouken merged commit 6daf2e9 into libsdl-org:main Dec 25, 2023
@slouken
Copy link
Collaborator

slouken commented Dec 25, 2023

Thanks!

You can actually test with the testcontroller program in the test directory.

Build with:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DSDL_TESTS=ON ..
make -j10
test/testcontroller

@twhitehead
Copy link
Contributor Author

No problem, and thank you very much for the final review and merge! 😃

I ran the testcontroller program and it seems to work in and out of the steam container.

@slouken
Copy link
Collaborator

slouken commented Dec 25, 2023

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants