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