From 48f9bc5fb4040c06f3af6b7758d82ae01d5b8ff4 Mon Sep 17 00:00:00 2001 From: David Griffith Date: Wed, 8 Mar 2017 22:21:05 -0800 Subject: [PATCH] This approach almost works. First character typed after the resize gets lost though. --- src/curses/ux_screen.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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 */ -- 2.34.1