From 0ec1a0e56dd8cff254b9a55bdb02b606f6e9dd17 Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 3 Oct 2016 00:04:50 +0200 Subject: [PATCH] we dont want to use while(true) lol --- src/fenrir-package/inputDriver/evdev.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fenrir-package/inputDriver/evdev.py b/src/fenrir-package/inputDriver/evdev.py index 317ed3f0..33976591 100644 --- a/src/fenrir-package/inputDriver/evdev.py +++ b/src/fenrir-package/inputDriver/evdev.py @@ -33,8 +33,8 @@ class driver(): r, w, x = select(self.iDevices, [], [], self.env['runtime']['settingsManager'].getSettingAsFloat('screen', 'screenUpdateDelay')) if r != []: for fd in r: - while(True): - event = self.iDevices[fd].read_one() + event = self.iDevices[fd].read_one() + while(event): if not event: return None self.env['input']['eventBuffer'].append( [self.iDevices[fd], self.uDevices[fd], event]) @@ -44,6 +44,7 @@ class driver(): return currMapEvent if currMapEvent['EventState'] in [0,1,2]: return currMapEvent + event = self.iDevices[fd].read_one() return None def writeEventBuffer(self):