make fenrir quitable with eventloop, remove delay in evdevDriver
This commit is contained in:
@@ -42,6 +42,7 @@ class eventManager():
|
||||
self.cleanEventQueue()
|
||||
def timerProcess(self):
|
||||
time.sleep(0.005)
|
||||
#self.env['runtime']['settingsManager'].getSettingAsFloat('screen', 'screenUpdateDelay')
|
||||
return time.time()
|
||||
def terminateAllProcesses(self):
|
||||
for proc in self._eventProcesses:
|
||||
@@ -118,7 +119,7 @@ class eventManager():
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
def simpleEventWorkerThread(self, event, function):
|
||||
def simpleEventWorkerThread(self, event, function, runOnce = False):
|
||||
if not isinstance(event, fenrirEventType):
|
||||
return
|
||||
if not callable(function):
|
||||
@@ -130,6 +131,8 @@ class eventManager():
|
||||
except Exception as e:
|
||||
print(e)
|
||||
self.putToEventQueue(event, Data)
|
||||
if runOnce:
|
||||
break
|
||||
'''
|
||||
def p():
|
||||
time.sleep(0.02)
|
||||
|
@@ -109,7 +109,7 @@ class fenrirManager():
|
||||
self.environment['runtime']['commandManager'].executeCommand( self.environment['commandInfo']['currCommand'], 'commands')
|
||||
|
||||
def shutdownRequest(self):
|
||||
self.environment['general']['running'] = False
|
||||
self.environment['eventManager'].stopMainEventLoop()
|
||||
|
||||
def captureSignal(self, siginit, frame):
|
||||
self.shutdownRequest()
|
||||
|
@@ -7,7 +7,6 @@
|
||||
from core import debug
|
||||
|
||||
generalData = {
|
||||
'running': True,
|
||||
'args': None,
|
||||
'tutorialMode': False,
|
||||
'currUser':'',
|
||||
|
Reference in New Issue
Block a user