From a76aa855a366f4cccb0826d0186c10da8e39c178 Mon Sep 17 00:00:00 2001 From: Chrys Date: Thu, 22 Aug 2019 21:13:33 +0200 Subject: [PATCH] only wait if needed --- src/fenrirscreenreader/screenDriver/vcsaDriver.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fenrirscreenreader/screenDriver/vcsaDriver.py b/src/fenrirscreenreader/screenDriver/vcsaDriver.py index 1195676e..7f065b0a 100644 --- a/src/fenrirscreenreader/screenDriver/vcsaDriver.py +++ b/src/fenrirscreenreader/screenDriver/vcsaDriver.py @@ -174,8 +174,10 @@ class driver(screenDriver): # anything else? wait for completion while True: screenContent = dirtyContent + r,_,_ select.select([vcsu[currScreen]],[],[],0.07) + if not vcsa[currScreen] in r: + break vcsa[currScreen].seek(0) - time.sleep(0.03) dirtyContent = vcsa[currScreen].read() if screenContent == dirtyContent: break