diff options
| author | Dolphin Bot <dolphin-emu-bot@users.noreply.github.com> | 2014-07-18 12:59:04 +0200 |
|---|---|---|
| committer | Dolphin Bot <dolphin-emu-bot@users.noreply.github.com> | 2014-07-18 12:59:04 +0200 |
| commit | b9dc69105d0529c74a4f3c8f3579fa699f2d7bdc (patch) | |
| tree | 2b2d159bf145e2849fb2a59108e9effb3c12fdfe /Source/Core/VideoBackends | |
| parent | a180cd60ee9d5bfb0f92084515ee4b28c1a260e6 (diff) | |
| parent | eaa7460636f01f7779154259d492568c9d2dee1e (diff) | |
Merge pull request #595 from Armada651/pref_log
FPSCounter: Flush the logs every second and close them when the renderer is shut down.
Diffstat (limited to 'Source/Core/VideoBackends')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/Render.cpp | 10 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/OGL/Render.cpp | 7 |
2 files changed, 2 insertions, 15 deletions
diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp index adb9613213..2699b56a46 100644 --- a/Source/Core/VideoBackends/D3D/Render.cpp +++ b/Source/Core/VideoBackends/D3D/Render.cpp @@ -38,8 +38,6 @@ namespace DX11 { -static int s_fps = 0; - static u32 s_LastAA = 0; static Television s_television; @@ -181,8 +179,6 @@ Renderer::Renderer(void *&window_handle) { int x, y, w_temp, h_temp; - FPSCounter::Initialize(); - Host_GetRenderWindowSize(x, y, w_temp, h_temp); D3D::Create((HWND)window_handle); @@ -903,7 +899,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl // Finish up the current frame, print some stats if (g_ActiveConfig.bShowFPS) { - std::string fps = StringFromFormat("FPS: %d\n", s_fps); + std::string fps = StringFromFormat("FPS: %d\n", m_fps_counter.m_fps); D3D::font.DrawTextScaled(0, 0, 20, 0.0f, 0xFF00FFFF, fps); } @@ -952,10 +948,6 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl FramebufferManagerBase::SetLastXfbHeight(h); } - // update FPS counter - if (XFBWrited) - s_fps = FPSCounter::Update(); - // Flip/present backbuffer to frontbuffer here D3D::Present(); diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 5fb486c6d9..c9b373918b 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -85,7 +85,6 @@ VideoConfig g_ogl_config; // Declarations and definitions // ---------------------------- -static int s_fps = 0; static GLuint s_ShowEFBCopyRegions_VBO = 0; static GLuint s_ShowEFBCopyRegions_VAO = 0; static SHADER s_ShowEFBCopyRegions; @@ -339,10 +338,8 @@ Renderer::Renderer() OSDInternalW = 0; OSDInternalH = 0; - s_fps=0; s_ShowEFBCopyRegions_VBO = 0; s_blendMode = 0; - FPSCounter::Initialize(); bool bSuccess = true; @@ -688,7 +685,7 @@ void Renderer::DrawDebugInfo() std::string debug_info; if (g_ActiveConfig.bShowFPS) - debug_info += StringFromFormat("FPS: %d\n", s_fps); + debug_info += StringFromFormat("FPS: %d\n", m_fps_counter.m_fps); if (SConfig::GetInstance().m_ShowLag) debug_info += StringFromFormat("Lag: %" PRIu64 "\n", Movie::g_currentLagCount); @@ -1585,8 +1582,6 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl } } - if (XFBWrited) - s_fps = FPSCounter::Update(); // --------------------------------------------------------------------- if (!DriverDetails::HasBug(DriverDetails::BUG_BROKENSWAP)) { |
