mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-06 15:29:57 +07:00
Update example, use /dev/input/js0, the first joystick
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -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
@@ -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.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user