fix (?) some bugs with IIe/gsos high-bit characters.

This commit is contained in:
Kelvin Sherlock 2018-01-31 22:37:52 -05:00
parent 6a117c7b8a
commit 9fcf9f333f
2 changed files with 8 additions and 8 deletions

View File

@ -220,26 +220,26 @@
| 0x80 .. 0x9f ${
/* uppercase inverse/normal */
uint8_t flag = ~(_context.flags & Screen::FlagInverse);
uint8_t flag = _context.flags ^ Screen::FlagInverse;
screen->putc(fc - 0x40, _context.cursor, flag);
} $advance
| 0xa0 .. 0xbf ${
/* special inverse/normal */
uint8_t flag = ~(_context.flags & Screen::FlagInverse);
uint8_t flag = _context.flags ^ Screen::FlagInverse;
screen->putc(fc - 0x80, _context.cursor, flag);
} $advance
| 0xc0 .. 0xdf ${
/* uppercase normal / mouse text. */
uint8_t flag = ~(_context.flags & Screen::FlagInverse);
uint8_t flag = _context.flags ^ Screen::FlagInverse;
if (flag) flag |= Screen::FlagMouseText;
screen->putc(fc - 0x80, _context.cursor, flag);
} $advance
| 0xe0 .. 0xff ${
/* special inverse/normal */
uint8_t flag = ~(_context.flags & Screen::FlagInverse);
uint8_t flag = _context.flags ^ Screen::FlagInverse;
screen->putc(fc - 0x80, _context.cursor, flag);
} $advance

View File

@ -420,26 +420,26 @@ static void advance(Screen *screen, gsos_context &ctx) {
| 0x80 .. 0x9f ${
/* uppercase inverse/normal */
uint8_t flags = ~(_context.flags & Screen::FlagInverse);
uint8_t flags = _context.flags ^ Screen::FlagInverse;
screen->putc(fc - 0x40, cursor, flags);
} $advance_if
| 0xa0 .. 0xbf ${
/* special inverse/normal */
uint8_t flags = ~(_context.flags & Screen::FlagInverse);
uint8_t flags = _context.flags ^ Screen::FlagInverse;
screen->putc(fc - 0x80, cursor, flags);
} $advance_if
| 0xc0 .. 0xdf ${
/* uppercase normal / mouse text. */
uint8_t flags = ~(_context.flags & Screen::FlagInverse);
uint8_t flags = _context.flags ^ Screen::FlagInverse;
if (flags) flags |= Screen::FlagMouseText;
screen->putc(fc - 0x80, cursor, flags);
} $advance_if
| 0xe0 .. 0xff ${
/* special inverse/normal */
uint8_t flags = ~(_context.flags & Screen::FlagInverse);
uint8_t flags = _context.flags ^ Screen::FlagInverse;
screen->putc(fc - 0x80, cursor, flags);
} $advance_if