mirror of https://github.com/ipxe/ipxe.git
Reset screen on exit as well as entry
parent
24f945edce
commit
82ec3fc5cc
|
@ -4,7 +4,7 @@
|
||||||
unsigned short _COLS = 80;
|
unsigned short _COLS = 80;
|
||||||
unsigned short _LINES = 24;
|
unsigned short _LINES = 24;
|
||||||
|
|
||||||
static void ansiscr_init ( struct _curses_screen *scr ) {
|
static void ansiscr_reset ( struct _curses_screen *scr ) {
|
||||||
/* Reset terminal attributes and clear screen */
|
/* Reset terminal attributes and clear screen */
|
||||||
scr->attrs = 0;
|
scr->attrs = 0;
|
||||||
scr->curs_x = 0;
|
scr->curs_x = 0;
|
||||||
|
@ -12,9 +12,6 @@ static void ansiscr_init ( struct _curses_screen *scr ) {
|
||||||
printf ( "\033[0m\033[2J\033[1;1H" );
|
printf ( "\033[0m\033[2J\033[1;1H" );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ansiscr_exit ( struct _curses_screen *scr __unused ) {
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ansiscr_movetoyx ( struct _curses_screen *scr,
|
static void ansiscr_movetoyx ( struct _curses_screen *scr,
|
||||||
unsigned int y, unsigned int x ) {
|
unsigned int y, unsigned int x ) {
|
||||||
if ( ( x != scr->curs_x ) || ( y != scr->curs_y ) ) {
|
if ( ( x != scr->curs_x ) || ( y != scr->curs_y ) ) {
|
||||||
|
@ -60,8 +57,8 @@ static bool ansiscr_peek ( struct _curses_screen *scr __unused ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
SCREEN _ansi_screen = {
|
SCREEN _ansi_screen = {
|
||||||
.init = ansiscr_init,
|
.init = ansiscr_reset,
|
||||||
.exit = ansiscr_exit,
|
.exit = ansiscr_reset,
|
||||||
.movetoyx = ansiscr_movetoyx,
|
.movetoyx = ansiscr_movetoyx,
|
||||||
.putc = ansiscr_putc,
|
.putc = ansiscr_putc,
|
||||||
.getc = ansiscr_getc,
|
.getc = ansiscr_getc,
|
||||||
|
|
Loading…
Reference in New Issue