-fps display now work again in windows port

This commit is contained in:
cyberwarriorx 2006-11-22 19:09:09 +00:00
parent 04a2fe35b8
commit 3e916e190a
1 changed files with 13 additions and 0 deletions

View File

@ -101,6 +101,9 @@ DWORD WINAPI run( LPVOID lpParameter)
u64 diffticks=0;
u32 framecount=0;
u64 onesecondticks=0;
int fps=0;
int fpsframecount=0;
u64 fpsticks=0;
//CreateBitmapIndirect(&bmi);
memset(&bmi, 0, sizeof(bmi));
@ -137,6 +140,16 @@ DWORD WINAPI run( LPVOID lpParameter)
SetDIBitsToDevice(hdc, 0, 0, 256, 192*2, 0, 0, 192, 192*2, GPU_screen, (BITMAPINFO*)&bmi, DIB_RGB_COLORS);
//SetDIBitsToDevice(hdc, 0, 0, 256, 192, 0, 0, 0, 192, GPU_screen, (BITMAPINFO*)&bmi, DIB_RGB_COLORS);
#endif
fpsframecount++;
QueryPerformanceCounter((LARGE_INTEGER *)&curticks);
if(curticks >= fpsticks + freq)
{
fps = fpsframecount;
sprintf(txt,"DeSmuME %d", fps);
SetWindowText(hwnd, txt);
fpsframecount = 0;
QueryPerformanceCounter((LARGE_INTEGER *)&fpsticks);
}
framesskipped = 0;