From: Timo Kokkonen Date: Wed, 31 Mar 2010 19:44:23 +0000 (+0300) Subject: main loop: Modify debug prints X-Git-Url: http://git.itanic.dy.fi/?p=sdl-planets;a=commitdiff_plain;h=aedb3be79159aeb35d9e31d76ee246f99a37ce20 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 --- 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++;