From 4002bc07e1e3bf2bce107e3f482766da207138b4 Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 6 Nov 2019 14:22:20 +0100 Subject: [PATCH] Update vcsaDriver.py --- .../screenDriver/vcsaDriver.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/fenrirscreenreader/screenDriver/vcsaDriver.py b/src/fenrirscreenreader/screenDriver/vcsaDriver.py index d596a62c..dcf9fb36 100644 --- a/src/fenrirscreenreader/screenDriver/vcsaDriver.py +++ b/src/fenrirscreenreader/screenDriver/vcsaDriver.py @@ -265,6 +265,10 @@ class driver(screenDriver): for y in range(rows): lineText = '' lineAttrib = [] + blink = 0 + bold = 0 + ink = 7 + paper = 0 for x in range(cols): data = allData[i: i + 2] i += 2 @@ -287,15 +291,16 @@ class driver(screenDriver): lineAttrib.append(charAttrib) lineText += ' ' continue - blink = 0 - bold = 0 - ink = 7 - paper = 0 ch = None try: (sh,) = unpack("=H", data) attr = (sh >> 8) & 0xFF ch = sh & 0xFF + try: + if sh & self.hichar: + ch |= 0x100 + except: + ch = None if self.hichar == 0x100: attr >>= 1 ink = attr & 0x0F @@ -309,11 +314,6 @@ class driver(screenDriver): bold = 1 #if (ink != 7) or (paper != 0): # print(ink,paper) - try: - if sh & self.hichar: - ch |= 0x100 - except: - ch = None except: pass try: