From c4ac2eae5d57543105add4cc5e62faa52dbde9b7 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Thu, 31 May 2018 23:37:39 +0200 Subject: [PATCH] Update example, use /dev/input/js0, the first joystick Signed-off-by: Joachim Nilsson --- API.md | 2 +- examples/joystick.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index 1419734..f0fd242 100644 --- a/API.md +++ b/API.md @@ -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."); diff --git a/examples/joystick.c b/examples/joystick.c index 8bce372..b3f45fe 100644 --- a/examples/joystick.c +++ b/examples/joystick.c @@ -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.");