Issue #125 Linux: error on failure to open input device file

This commit is contained in:
Mat Sutcliffe
2021-11-21 20:06:35 +00:00
parent cec471b8ac
commit 6c114c9b32
2 changed files with 5 additions and 0 deletions

View File

@@ -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();
}

View File

@@ -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)