aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fbcon.c2
-rw-r--r--fbi.c3
-rw-r--r--fbpdf.c3
3 files changed, 5 insertions, 3 deletions
diff --git a/fbcon.c b/fbcon.c
index b231984..d34eec2 100644
--- a/fbcon.c
+++ b/fbcon.c
@@ -314,7 +314,7 @@ static void child_exec_shell(struct winsize *win)
fprintf(stderr, "\x1b[0m");
/* check for errors */
- if (libinput_deverror != 0) {
+ if (libinput_deverror != 0 || libinput_devcount == 0) {
fprintf(stderr, "ERROR: failed to open input devices (%d ok, %d failed)\n",
libinput_devcount, libinput_deverror);
return;
diff --git a/fbi.c b/fbi.c
index 37c2fcd..b40010c 100644
--- a/fbi.c
+++ b/fbi.c
@@ -1358,7 +1358,8 @@ int main(int argc, char *argv[])
extents = shadow_font_init(fontname);
kbd_init(use_libinput, gfx->devnum);
- if (use_libinput && libinput_deverror != 0) {
+ if (use_libinput && (libinput_deverror != 0 ||
+ libinput_devcount == 0)) {
fprintf(stderr, "ERROR: failed to open input devices (%d ok, %d failed)\n",
libinput_devcount, libinput_deverror);
cleanup_and_exit(0);
diff --git a/fbpdf.c b/fbpdf.c
index 58b4741..c29f78b 100644
--- a/fbpdf.c
+++ b/fbpdf.c
@@ -350,7 +350,8 @@ int main(int argc, char *argv[])
}
kbd_init(use_libinput, gfx->devnum);
- if (use_libinput && libinput_deverror != 0) {
+ if (use_libinput && (libinput_deverror != 0 ||
+ libinput_devcount == 0)) {
fprintf(stderr, "ERROR: failed to open input devices (%d ok, %d failed)\n",
libinput_devcount, libinput_deverror);
cleanup_and_exit(0);