Every command is done under a nix-shell opened with the following command.
$ nix-shell -p gcc SDL2 steam-runFirst thing compile the executable to debug controller hot plugging.
$ gcc ./main.c -o ./main -lSDL2Now there are three ways to test.
./mainsteam-run ./mainsudo steam-run ./main
The result for the first method and the third are the same.
The second only sees the controller if it was plugged before running the program, but trying to re-plug it will not show any message.