use device insteed of fn

This commit is contained in:
chrys 2018-05-11 22:17:38 +02:00
parent dab2d4ca75
commit ba3ad7719d

View File

@ -247,13 +247,14 @@ class driver(inputDriver):
self.uDevices[fd] = None self.uDevices[fd] = None
return return
try: try:
self.uDevices[fd] = UInput.from_device(self.iDevices[fd].fn) self.uDevices[fd] = UInput.from_device(self.iDevices[fd])
except Exception as e: except Exception as e:
try: try:
self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: compat fallback: ' + str(e),debug.debugLevel.WARNING) self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: compat fallback: ' + str(e),debug.debugLevel.WARNING)
dev = self.iDevices[fd] dev = self.iDevices[fd]
cap = dev.capabilities() cap = dev.capabilities()
del cap[0] del cap[0]
print(e)
self.uDevices[fd] = UInput( self.uDevices[fd] = UInput(
cap, cap,
dev.name, dev.name,