X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FInputDevice.py;h=6fe81eff3a21f967ad66487da35189d3d9773fdf;hp=d675ca3a7249afacbc405ba282a515044313daf4;hb=HEAD;hpb=7030e4d7bb27c16098b04526d0bfc72291459665 diff --git a/lib/python/Components/InputDevice.py b/lib/python/Components/InputDevice.py index d675ca3..6fe81ef 100755 --- a/lib/python/Components/InputDevice.py +++ b/lib/python/Components/InputDevice.py @@ -8,8 +8,8 @@ from os import path as os_path, listdir, open as os_open, close as os_close, wri # asm-generic/ioctl.h IOC_NRBITS = 8L IOC_TYPEBITS = 8L -IOC_SIZEBITS = 13L -IOC_DIRBITS = 3L +IOC_SIZEBITS = 14L +IOC_DIRBITS = 2L IOC_NRSHIFT = 0L IOC_TYPESHIFT = IOC_NRSHIFT+IOC_NRBITS @@ -33,6 +33,9 @@ class inputDevices: devices = listdir("/dev/input/") for evdev in devices: + if not evdev.startswith("event"): + continue + try: buffer = "\0"*512 self.fd = os_open("/dev/input/" + evdev, O_RDWR | O_NONBLOCK) @@ -46,9 +49,9 @@ class inputDevices: if self.name: if self.name == 'dreambox front panel': continue - if self.name == "dreambox advanced remote control (native)" and config.misc.rcused.value != 0: + if self.name == "dreambox advanced remote control (native)" and config.misc.rcused.value == 1: continue - if self.name == "dreambox remote control (native)" and config.misc.rcused.value == 0: + if self.name == "dreambox remote control (native)" and config.misc.rcused.value != 1: continue self.Devices[evdev] = {'name': self.name, 'type': self.getInputDeviceType(self.name),'enabled': False, 'configuredName': None } @@ -74,7 +77,7 @@ class inputDevices: return sorted(self.Devices.iterkeys()) def getDefaultRCdeviceName(self): - if config.misc.rcused.value == 0: + if config.misc.rcused.value != 1: for device in self.Devices.iterkeys(): if self.Devices[device]["name"] == "dreambox advanced remote control (native)": return device