comparison 3x666.c @ 28:9f72bd464802

Add fps information.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 16 Mar 2013 01:06:33 +0200
parents 3f8f518905db
children 03ef1b48e380
comparison
equal deleted inserted replaced
27:3f8f518905db 28:9f72bd464802
1159 } 1159 }
1160 1160
1161 error_exit: 1161 error_exit:
1162 // Shutdown 1162 // Shutdown
1163 dmPrint("Shutting down.\n"); 1163 dmPrint("Shutting down.\n");
1164 dmPrint("%d frames in %d ms, %1.2f fps\n",
1165 engine.frameCount,
1166 engine.frameTime - engine.startTime,
1167 (float) (engine.frameCount * 1000.0f) / (float) (engine.frameTime - engine.startTime)
1168 );
1169
1164 SDL_ShowCursor(SDL_ENABLE); 1170 SDL_ShowCursor(SDL_ENABLE);
1165 if (engine.screen) 1171 if (engine.screen)
1166 SDL_FreeSurface(engine.screen); 1172 SDL_FreeSurface(engine.screen);
1167 1173
1168 SDL_LockAudio(); 1174 SDL_LockAudio();