get sure decode doesnt break
This commit is contained in:
parent
6761b6267c
commit
f04d8584d9
@ -287,6 +287,12 @@ class driver(screenDriver):
|
||||
lineAttrib.append(charAttrib)
|
||||
lineText += ' '
|
||||
continue
|
||||
blink = 0
|
||||
bold = 0
|
||||
ink = 7
|
||||
paper = 0
|
||||
ch = 32
|
||||
try:
|
||||
(sh,) = unpack("=H", data)
|
||||
attr = (sh >> 8) & 0xFF
|
||||
ch = sh & 0xFF
|
||||
@ -294,7 +300,6 @@ class driver(screenDriver):
|
||||
attr >>= 1
|
||||
ink = attr & 0x0F
|
||||
paper = (attr>>4) & 0x0F
|
||||
blink = 0
|
||||
if attr & 1:
|
||||
blink = 1
|
||||
# blink seems to be set always, ignore for now
|
||||
@ -306,10 +311,13 @@ class driver(screenDriver):
|
||||
# print(ink,paper)
|
||||
if sh & self.hichar:
|
||||
ch |= 0x100
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
lineText += self.charmap[ch]
|
||||
except KeyError:
|
||||
lineText += '?'
|
||||
|
||||
charAttrib = [
|
||||
self.fgColorValues[ink],
|
||||
self.bgColorValues[paper],
|
||||
|
Loading…
Reference in New Issue
Block a user