diff options
author | Daniel Serpell <daniel.serpell@gmail.com> | 2020-05-03 00:23:04 -0400 |
---|---|---|
committer | Daniel Serpell <daniel.serpell@gmail.com> | 2020-05-03 01:07:14 -0400 |
commit | 8dc9acb698adc31ab6411dcbdcd6a7dd1edf9563 (patch) | |
tree | b51a2eee44e6404d671ce48240be25e602d3721a | |
parent | e3541120b2978abe01edf8780b1b1c57f5900c88 (diff) | |
download | emu2-8dc9acb698adc31ab6411dcbdcd6a7dd1edf9563.tar.gz |
Fixes color changes to background outside emulated window.
-rw-r--r-- | src/video.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video.c b/src/video.c index 0f0b844..df96015 100644 --- a/src/video.c +++ b/src/video.c @@ -200,6 +200,9 @@ static void term_goto_xy(unsigned x, unsigned y) if(term_posy < y) { putc('\r', tty_file); + // Set background color to black, as some terminals insert lines with + // the current background color. + set_color(term_color & 0x0F); // TODO: Draw new line with background color from video screen for(unsigned i = term_posy; i < y; i++) putc('\n', tty_file); @@ -231,8 +234,8 @@ static void term_goto_xy(unsigned x, unsigned y) // Outputs a character with the given attributes at the given position static void put_vc_xy(uint8_t vc, uint8_t color, unsigned x, unsigned y) { - set_color(color); term_goto_xy(x, y); + set_color(color); put_vc(vc); term_posx++; |