Commit 222c531b authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Count the framerate per swapchain, not globally.

parent 9b492099
......@@ -307,15 +307,13 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
/* FPS support */
if (TRACE_ON(fps))
{
static long prev_time, frames;
DWORD time = GetTickCount();
frames++;
This->frames++;
/* every 1.5 seconds */
if (time - prev_time > 1500) {
TRACE_(fps)("@ approx %.2ffps\n", 1000.0*frames/(time - prev_time));
prev_time = time;
frames = 0;
if (time - This->prev_time > 1500) {
TRACE_(fps)("%p @ approx %.2ffps\n", This, 1000.0*This->frames/(time - This->prev_time));
This->prev_time = time;
This->frames = 0;
}
}
......
......@@ -1313,6 +1313,8 @@ typedef struct IWineD3DSwapChainImpl
D3DPRESENT_PARAMETERS presentParms;
DWORD orig_width, orig_height;
long prev_time, frames; /* Performance tracking */
/* TODO: move everything up to drawable off into a context manager
and store the 'data' in the contextManagerData interface.
IUnknown *contextManagerData;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment