Update evdevDriver.py

This commit is contained in:
chrys87 2018-05-18 13:54:08 +02:00 committed by GitHub
parent efbaa0078a
commit 27c5075b23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,13 +147,19 @@ class driver(inputDriver):
self.removeAllDevices()
print(newDevices)
deviceFileList = None
if newDevices and not init:
deviceFileList = newDevices
else:
deviceFileList = evdev.list_devices()
if len(deviceFileList) == self.iDeviceNo:
return
return
if not deviceFileList:
return
mode = self.env['runtime']['settingsManager'].getSetting('keyboard', 'device').upper()
iDevicesFiles = []
for device in self.iDevices:
iDevicesFiles.append(self.iDevices[device].fn)