Skip to content

Commit b2ecd77

Browse files
committed
GameEngine.h: Moving down the benchmark printout to after the terminal window size restoration.
* This fixes a bug on Windows that caused the benchmarks printout disappear after the application code had quitted/exited.
1 parent 95520d3 commit b2ecd77

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

include/Termin8or/sys/GameEngine.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,10 @@ namespace t8x
369369

370370
end_screen(sh);
371371

372+
if (m_params.enable_terminal_window_resize)
373+
if (term_win_rows > 0 && term_win_cols > 0)
374+
t8::resize_terminal_window(term_win_rows, term_win_cols);
375+
372376
if (m_params.enable_benchmark && 0.f < dur_s)
373377
{
374378
auto avg_fps = frame_ctr / dur_s;
@@ -378,9 +382,6 @@ namespace t8x
378382
std::cout << "# Partial Redraws = " << sh.get_num_partial_redraws() << std::endl;
379383
}
380384

381-
if (m_params.enable_terminal_window_resize)
382-
if (term_win_rows > 0 && term_win_cols > 0)
383-
t8::resize_terminal_window(term_win_rows, term_win_cols);
384385
on_quit();
385386
}
386387

0 commit comments

Comments
 (0)