diff options
Diffstat (limited to 'plugins/linux/src/native/eventInterface.cpp')
-rw-r--r-- | plugins/linux/src/native/eventInterface.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/linux/src/native/eventInterface.cpp b/plugins/linux/src/native/eventInterface.cpp index 654a0bd..2c41cbd 100644 --- a/plugins/linux/src/native/eventInterface.cpp +++ b/plugins/linux/src/native/eventInterface.cpp @@ -81,15 +81,19 @@ int evInit() { } if ((fd = open(deviceFileNames[0], O_RDONLY)) <0) { - return -1; + evNumDevices=0; + evInited=1; + return 0; } if (ioctl(fd, EVIOCGVERSION, &eventInterfaceVersion)) { close(fd); - return -1; + evNumDevices=0; + evInited=1; + return 0; } - close(fd); + if(fd>=0) {close(fd);} Device *tempDeviceList[numDeviceFiles]; |