Update vcsaDriver.py

This commit is contained in:
chrys 2019-11-06 14:22:20 +01:00 committed by GitHub
parent d5ca736f7c
commit 4002bc07e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -265,6 +265,10 @@ class driver(screenDriver):
for y in range(rows): for y in range(rows):
lineText = '' lineText = ''
lineAttrib = [] lineAttrib = []
blink = 0
bold = 0
ink = 7
paper = 0
for x in range(cols): for x in range(cols):
data = allData[i: i + 2] data = allData[i: i + 2]
i += 2 i += 2
@ -287,15 +291,16 @@ class driver(screenDriver):
lineAttrib.append(charAttrib) lineAttrib.append(charAttrib)
lineText += ' ' lineText += ' '
continue continue
blink = 0
bold = 0
ink = 7
paper = 0
ch = None ch = None
try: try:
(sh,) = unpack("=H", data) (sh,) = unpack("=H", data)
attr = (sh >> 8) & 0xFF attr = (sh >> 8) & 0xFF
ch = sh & 0xFF ch = sh & 0xFF
try:
if sh & self.hichar:
ch |= 0x100
except:
ch = None
if self.hichar == 0x100: if self.hichar == 0x100:
attr >>= 1 attr >>= 1
ink = attr & 0x0F ink = attr & 0x0F
@ -309,11 +314,6 @@ class driver(screenDriver):
bold = 1 bold = 1
#if (ink != 7) or (paper != 0): #if (ink != 7) or (paper != 0):
# print(ink,paper) # print(ink,paper)
try:
if sh & self.hichar:
ch |= 0x100
except:
ch = None
except: except:
pass pass
try: try: