diff --git a/stepmania/src/RageDisplay.cpp b/stepmania/src/RageDisplay.cpp index c60ed49010..d43a34fcad 100644 --- a/stepmania/src/RageDisplay.cpp +++ b/stepmania/src/RageDisplay.cpp @@ -106,6 +106,11 @@ CString RageDisplay::GetStats() const return ssprintf( "%i FPS\n%i av FPS\n%i VPF", GetFPS(), GetCumFPS(), GetVPF() ); } +void RageDisplay::EndFrame() +{ + ProcessStatsOnFlip(); +} + void RageDisplay::StatsAddVerts( int iNumVertsRendered ) { g_iVertsRenderedSinceLastCheck += iNumVertsRendered; } /* Draw a line as a quad. GL_LINES with SmoothLines off can draw line diff --git a/stepmania/src/RageDisplay.h b/stepmania/src/RageDisplay.h index a0a2793477..d4373ec675 100644 --- a/stepmania/src/RageDisplay.h +++ b/stepmania/src/RageDisplay.h @@ -134,7 +134,7 @@ public: virtual void ResolutionChanged() { } virtual bool BeginFrame() = 0; - virtual void EndFrame() = 0; + virtual void EndFrame(); virtual VideoModeParams GetVideoModeParams() const = 0; bool IsWindowed() const { return this->GetVideoModeParams().windowed; } diff --git a/stepmania/src/RageDisplay_D3D.cpp b/stepmania/src/RageDisplay_D3D.cpp index ba5260b90e..b56ea55453 100644 --- a/stepmania/src/RageDisplay_D3D.cpp +++ b/stepmania/src/RageDisplay_D3D.cpp @@ -644,9 +644,10 @@ void RageDisplay_D3D::EndFrame() { g_pd3dDevice->EndScene(); g_pd3dDevice->Present( 0, 0, 0, 0 ); - ProcessStatsOnFlip(); GraphicsWindow::Update(); + + RageDisplay::EndFrame(); } bool RageDisplay_D3D::SupportsTextureFormat( PixelFormat pixfmt, bool realtime ) diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index 4910af7c19..7e339e4fc5 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -734,7 +734,6 @@ void RageDisplay_OGL::EndFrame() glFlush(); wind->SwapBuffers(); - ProcessStatsOnFlip(); wind->Update(); @@ -771,6 +770,8 @@ void RageDisplay_OGL::EndFrame() XUnlockDisplay( g_X11Display ); #endif } + + RageDisplay::EndFrame(); } RageSurface* RageDisplay_OGL::CreateScreenshot()