summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle K <kylek389@gmail.com>2010-09-30 22:41:27 -0500
committerKamil Kaminski <kamilkss@gmail.com>2010-09-30 22:43:50 -0500
commit9165d25bdcba577e53ee8022067c0984484a449b (patch)
treecde1d496f47ee117293f78d4e8f83d52a6b2aa90
parent9bab4b58c1250be1594fa8bf971fae39fb258142 (diff)
downloadGLPyramid-9165d25bdcba577e53ee8022067c0984484a449b.tar.gz
GLPyramid-9165d25bdcba577e53ee8022067c0984484a449b.tar.bz2
GLPyramid-9165d25bdcba577e53ee8022067c0984484a449b.zip
pyramid: disable fps counter
-rw-r--r--sdl/pyramid.c9
1 files 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;