From: David Griffith Date: Thu, 9 Mar 2017 06:21:05 +0000 (-0800) Subject: This approach almost works. First character typed after the resize gets lost though. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=48f9bc5fb4040c06f3af6b7758d82ae01d5b8ff4;p=liskon_frotz.git This approach almost works. First character typed after the resize gets lost though. --- diff --git a/src/curses/ux_screen.c b/src/curses/ux_screen.c index eb5bc2a..0e2d703 100644 --- a/src/curses/ux_screen.c +++ b/src/curses/ux_screen.c @@ -35,6 +35,7 @@ extern void resize_screen(void); extern void restart_header(void); +extern void restart_screen(void); /* * os_erase_area @@ -150,11 +151,11 @@ void unix_resize_display(void) h_flags |= REFRESH_FLAG; /* Get new terminal dimensions */ - getmaxyx(stdscr, y, x); +// getmaxyx(stdscr, y, x); /* Update the game's header */ - h_screen_width = (zword) x; - h_screen_height = (zword) y; + h_screen_width = (zword) COLS; + h_screen_height = (zword) LINES; h_screen_cols = (zbyte) (h_screen_width / h_font_width); h_screen_rows = (zbyte)(h_screen_height / h_font_height); @@ -163,9 +164,12 @@ void unix_resize_display(void) restart_header(); } - clearok(stdscr, 1); - redrawwin(stdscr); + endwin(); refresh(); - clearok(stdscr, 0); + +// clearok(stdscr, 1); +// redrawwin(stdscr); +// refresh(); +// clearok(stdscr, 0); }/* unix_redraw_display */