Update example, use /dev/input/js0, the first joystick

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2018-05-31 23:37:39 +02:00
parent 951f959549
commit c4ac2eae5d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -312,7 +312,7 @@ int main(void)
uev_t watcher;
uev_ctx_t ctx;
fd = open("/dev/input/js1", O_RDONLY, O_NONBLOCK);
fd = open("/dev/input/js0", O_RDONLY, O_NONBLOCK);
if (fd < 0)
errx(errno, "Cannot find a joystick attached.");
+1 -1
View File
@@ -78,7 +78,7 @@ int main(void)
uev_t js1_watcher;
uev_ctx_t ctx;
fd = open("/dev/input/js1", O_RDONLY, O_NONBLOCK);
fd = open("/dev/input/js0", O_RDONLY, O_NONBLOCK);
if (fd < 0)
errx(errno, "Cannot find a joystick attached.");