improve application detection and speed up
This commit is contained in:
parent
bc5bc3d1ef
commit
f231f72cbe
@ -24,9 +24,9 @@ class screenManager():
|
||||
def update(self, trigger='onUpdate'):
|
||||
self.env['runtime']['screenDriver'].getCurrScreen()
|
||||
if not self.isSuspendingScreen():
|
||||
if trigger == 'onUpdate' or self.isScreenChange():
|
||||
self.env['runtime']['screenDriver'].getCurrApplication()
|
||||
self.env['runtime']['screenDriver'].update(trigger)
|
||||
if trigger == 'onUpdate' or self.isScreenChange() or len(self.env['screenData']['newDelta']) > 6:
|
||||
self.env['runtime']['screenDriver'].getCurrApplication()
|
||||
self.env['screenData']['lastScreenUpdate'] = time.time()
|
||||
|
||||
def isSuspendingScreen(self):
|
||||
|
@ -33,7 +33,10 @@ 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()
|
||||
if not event:
|
||||
return None
|
||||
self.env['input']['eventBuffer'].append( [self.iDevices[fd], self.uDevices[fd], event])
|
||||
if event.code != 0:
|
||||
currMapEvent = self.env['runtime']['inputDriver'].mapEvent(event)
|
||||
|
@ -71,7 +71,7 @@ class driver():
|
||||
return xlist
|
||||
|
||||
|
||||
def update(self, trigger='updateScreen'):
|
||||
def update(self, trigger='onUpdate'):
|
||||
newContentBytes = b''
|
||||
try:
|
||||
# read screen
|
||||
|
Loading…
Reference in New Issue
Block a user