From aedb3be79159aeb35d9e31d76ee246f99a37ce20 Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Wed, 31 Mar 2010 22:44:23 +0300 Subject: [PATCH] main loop: Modify debug prints - Change the ordering of the fields - Add the counter of the simulation steps - Flush the stdout buffer out after each print. Signed-off-by: Timo Kokkonen --- main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 21841e4..bfdd295 100644 --- a/main.c +++ b/main.c @@ -225,10 +225,11 @@ static void loop(SDL_Surface *screen, int num_of_planets, double total_mass, } - printf(" \rFrames/s: %.2f, planets: %d" - ", scale %.2f, zoom %.2f, steps/s: %.2f, %ld", - last_fps, planets, time_scale, - camera.zoom, last_sps, step_count); + printf(" \rFrames/s: %.2f, steps/s: %.2f, planets: %d" + ", scale %.2f, zoom %.2f, step %d", + last_fps, last_sps, planets, time_scale, + camera.zoom, step_count); + fflush(stdout); framecount++; -- 2.44.0