Fix unix_resize_display.
authorTimo Korvola <tkorvola@iki.fi>
Wed, 24 Jan 2018 21:59:15 +0000 (23:59 +0200)
committerTimo Korvola <tkorvola@iki.fi>
Wed, 24 Jan 2018 22:06:09 +0000 (00:06 +0200)
COLS and LINES are updated by refresh(), so that needs
to come first.

src/curses/ux_screen.c

index 0e2d70306243d0fa9e067889ca2443d6bbc82da7..7a8be2fc346e6b1ae0dfc2191925a5137cb23fa3 100644 (file)
@@ -144,7 +144,10 @@ void os_scroll_area (int top, int left, int bottom, int right, int units)
  */
 void unix_resize_display(void)
 {
-    int x, y;
+//    int x, y;
+
+    endwin();
+    refresh();
 
     /* Notify the game that the display needs refreshing */
     if (h_version == V6)
@@ -164,9 +167,6 @@ void unix_resize_display(void)
        restart_header();
     }
 
-    endwin();
-    refresh();
-
 //    clearok(stdscr, 1);
 //    redrawwin(stdscr);
 //    refresh();