From cc803db04231d97c95e9bc11ed33b3584b0b2be9 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 8 Apr 2017 20:15:37 -0400 Subject: [PATCH] RenderBase: Eliminate renderer global accesses within the Renderer class There's no need to access these globals, the instance itself has access to these data members and functions. --- Source/Core/VideoCommon/RenderBase.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 3508014862..6af408d9a3 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -310,7 +310,7 @@ void Renderer::DrawDebugText() if (g_ActiveConfig.bShowFPS || SConfig::GetInstance().m_ShowFrameCount) { if (g_ActiveConfig.bShowFPS) - final_cyan += StringFromFormat("FPS: %u", g_renderer->m_fps_counter.GetFPS()); + final_cyan += StringFromFormat("FPS: %u", m_fps_counter.GetFPS()); if (g_ActiveConfig.bShowFPS && SConfig::GetInstance().m_ShowFrameCount) final_cyan += " - "; @@ -439,8 +439,8 @@ void Renderer::DrawDebugText() final_cyan += Statistics::ToStringProj(); // and then the text - g_renderer->RenderText(final_cyan, 20, 20, 0xFF00FFFF); - g_renderer->RenderText(final_yellow, 20, 20, 0xFFFFFF00); + RenderText(final_cyan, 20, 20, 0xFF00FFFF); + RenderText(final_yellow, 20, 20, 0xFFFFFF00); } float Renderer::CalculateDrawAspectRatio(int target_width, int target_height) const @@ -723,10 +723,10 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const u64 ticks, float Gamma) { // TODO: merge more generic parts into VideoCommon - g_renderer->SwapImpl(xfbAddr, fbWidth, fbStride, fbHeight, rc, ticks, Gamma); + SwapImpl(xfbAddr, fbWidth, fbStride, fbHeight, rc, ticks, Gamma); if (m_xfb_written) - g_renderer->m_fps_counter.Update(); + m_fps_counter.Update(); frameCount++; GFX_DEBUGGER_PAUSE_AT(NEXT_FRAME, true);