From 6c114c9b32893480fc6fc9d8762976adbd3e43d5 Mon Sep 17 00:00:00 2001 From: Mat Sutcliffe Date: Sun, 21 Nov 2021 20:06:35 +0000 Subject: [PATCH] Issue #125 Linux: error on failure to open input device file --- src/blackinput/linux/joysticklinux.cpp | 1 + src/blackinput/linux/keyboardlinux.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/blackinput/linux/joysticklinux.cpp b/src/blackinput/linux/joysticklinux.cpp index cb782c184..490ed8af5 100644 --- a/src/blackinput/linux/joysticklinux.cpp +++ b/src/blackinput/linux/joysticklinux.cpp @@ -120,6 +120,7 @@ namespace BlackInput } else { + BlackMisc::CLogMessage(this).error(u"Failed to open joystick device %1: %2") << fd->fileName() << fd->errorString(); fd->close(); fd->deleteLater(); } diff --git a/src/blackinput/linux/keyboardlinux.cpp b/src/blackinput/linux/keyboardlinux.cpp index 921f635f0..51932a0e8 100644 --- a/src/blackinput/linux/keyboardlinux.cpp +++ b/src/blackinput/linux/keyboardlinux.cpp @@ -254,6 +254,10 @@ namespace BlackInput } } } + else + { + BlackMisc::CLogMessage(this).error(u"Failed to open keyboard device %1: %2") << inputFile->fileName() << inputFile->errorString(); + } } void CKeyboardLinux::keyEvent(int keyCode, bool isPressed)