瀏覽代碼

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 19 年之前
父節點
當前提交
9ab17484d0
共有 1 個檔案被更改,包括 5 行新增0 行删除
  1. 5
    0
      src/hci/mucurses/wininit.c

+ 5
- 0
src/hci/mucurses/wininit.c 查看文件

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

Loading…
取消
儲存