Ver código fonte

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 17 anos atrás
pai
commit
9ab17484d0
1 arquivos alterados com 5 adições e 0 exclusões
  1. 5
    0
      src/hci/mucurses/wininit.c

+ 5
- 0
src/hci/mucurses/wininit.c Ver arquivo

@@ -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
 }

Carregando…
Cancelar
Salvar