Sfoglia il codice sorgente

Explicitly call erase(), to cope with platforms where the ANSI clear

screen sequence doesn't work (like bios_console.c on some platforms).
tags/v0.9.3
Michael Brown 18 anni fa
parent
commit
9ab17484d0
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5
    0
      src/hci/mucurses/wininit.c

+ 5
- 0
src/hci/mucurses/wininit.c Vedi File

@@ -1,3 +1,4 @@
1
+#include <stddef.h>
1 2
 #include <curses.h>
2 3
 
3 4
 /** @file
@@ -17,6 +18,7 @@ WINDOW *initscr ( void ) {
17 18
 	stdscr->scr->init( stdscr->scr );
18 19
 	stdscr->height = LINES;
19 20
 	stdscr->width = COLS;
21
+	erase();
20 22
 	return stdscr;
21 23
 }
22 24
 
@@ -25,6 +27,9 @@ WINDOW *initscr ( void ) {
25 27
  *
26 28
  */
27 29
 int endwin ( void ) {
30
+	attrset ( 0 );
31
+	color_set ( 0, NULL );
32
+	erase();
28 33
 	stdscr->scr->exit( stdscr->scr );
29 34
 	return OK;
30 35
 }

Loading…
Annulla
Salva