From 9fcf9f333f23ac041095faa383eec4b1389f1d88 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Wed, 31 Jan 2018 22:37:52 -0500 Subject: [PATCH] fix (?) some bugs with IIe/gsos high-bit characters. --- Emulators/Apple80.mm.ragel | 8 ++++---- Emulators/GSOSConsole.mm.ragel | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Emulators/Apple80.mm.ragel b/Emulators/Apple80.mm.ragel index bb9c627..92c6b8a 100644 --- a/Emulators/Apple80.mm.ragel +++ b/Emulators/Apple80.mm.ragel @@ -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 diff --git a/Emulators/GSOSConsole.mm.ragel b/Emulators/GSOSConsole.mm.ragel index 3a75b04..a25ff19 100644 --- a/Emulators/GSOSConsole.mm.ragel +++ b/Emulators/GSOSConsole.mm.ragel @@ -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