log fps
This commit is contained in:
parent
b82cffb728
commit
c526cf63de
9 changed files with 75 additions and 15 deletions
|
@ -97,6 +97,19 @@ DWORD WINAPI render_soft_main(void)
|
|||
|
||||
while (ddraw->render.run && WaitForSingleObject(ddraw->render.sem, INFINITE) != WAIT_FAILED)
|
||||
{
|
||||
#if _DEBUG
|
||||
static DWORD tick_fps = 0;
|
||||
static DWORD frame_count = 0;
|
||||
tick_start = timeGetTime();
|
||||
if (tick_start >= tick_fps)
|
||||
{
|
||||
printf("Frames: %lu - Elapsed: %lu ms\n", frame_count, (tick_start - tick_fps) + 1000);
|
||||
frame_count = 0;
|
||||
tick_fps = tick_start + 1000;
|
||||
}
|
||||
frame_count++;
|
||||
#endif
|
||||
|
||||
if(ddraw->render.maxfps > 0)
|
||||
{
|
||||
tick_start = timeGetTime();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue