From 9165d25bdcba577e53ee8022067c0984484a449b Mon Sep 17 00:00:00 2001 From: Kyle K Date: Thu, 30 Sep 2010 22:41:27 -0500 Subject: pyramid: disable fps counter --- sdl/pyramid.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sdl/pyramid.c b/sdl/pyramid.c index 35cd1c6..90f513c 100644 --- a/sdl/pyramid.c +++ b/sdl/pyramid.c @@ -287,23 +287,28 @@ int main(int argc, char **argv) SetupRC(); +#ifdef STAT_FPS /* fps counter */ Uint32 startclock = 0; Uint32 deltaclock = 0; Uint32 current_fps = 0; +#endif for (;;) { +#ifdef STAT_FPS startclock = SDL_GetTicks(); +#endif processEvents(); render(); - +#ifdef STAT_FPS deltaclock = SDL_GetTicks() - startclock; if (deltaclock != 0 ) current_fps = 1000 / deltaclock; static char buffer[30] = { 0 }; sprintf(buffer, "Textured Pyramid: %04d fps", current_fps); - SDL_WM_SetCaption(buffer, NULL); + SDL_WM_SetCaption(buffer, NULL); +#endif } return 0; -- cgit v1.2.3