Controller events via InputHandler in ubuntu

#1

Anyone ever got that working?

I’m follwing the outline here
https://book.amethyst.rs/stable/input/handling_input.html

And keyboard is fine…but I don’t seem to get controller inputs.
But on my system
/dev/input/js0
exists…
and when I use…
jstest-gtk
it finds it and lets me callibrate the thing,

Am I missing someting?

#2

Anwering my own question here… To get controllers to work I had to:
add to Cargo.toml

[features]
sdl_controller = ["amethyst/sdl_controller"]

And also had to
sudo apt-get install libsdl2-dev

and for good measure, not sure if neccessary, I also did
sudo apt-get install libsdl2-2.0

then
cargo run --features "sdl_controller vulkan"

and thus I finally arrived at reception of controller events

2 Likes