diff options
Diffstat (limited to 'payloads/libpayload/curses/tinycurses.c')
-rw-r--r-- | payloads/libpayload/curses/tinycurses.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/payloads/libpayload/curses/tinycurses.c b/payloads/libpayload/curses/tinycurses.c index b3f7bbc502..c901ff66b0 100644 --- a/payloads/libpayload/curses/tinycurses.c +++ b/payloads/libpayload/curses/tinycurses.c @@ -658,6 +658,8 @@ int whline(WINDOW *win, chtype ch, int n) return OK; } +#define SWAP_RED_BLUE(c) \ + (((c) & 0x4400) >> 2) | ((c) & 0xAA00) | (((c) & 0x1100) << 2) int wnoutrefresh(WINDOW *win) { // FIXME. @@ -720,6 +722,8 @@ int wnoutrefresh(WINDOW *win) serial_putchar(ch); } + c = SWAP_RED_BLUE(c); + if (curses_flags & F_ENABLE_CONSOLE) { ch = win->_line[y].text[x].chars[0]; |