NateTheGreat68 / gamepad-launcher

A simple way to launch an application when a gamepad connects
GNU General Public License v2.0
2 stars 0 forks source link

Change the match conditions on the udev rule and change to number 70 #9

Closed NateTheGreat68 closed 3 years ago

NateTheGreat68 commented 3 years ago

See discussion on #4. Matching on ENV{DEVNAME}=="/dev/input/js0" can potentially cause problems depending on system configuration - if the first gamepad isn't assigned to /dev/input/js0, it won't work. Suggest investigating ENV{ID_INPUT_JOYSTICK}==1 instead.

In addition, best practice suggests changing the rule number prefix from 99 to 70.

NateTheGreat68 commented 3 years ago

Note: this will cause the udev rule to trigger for every connected gamepad/joystick (instead of just the first when matching js0), but the systemd service will only start once so this is a non-issue.