From c756025902be856e87894e128073192224adab17 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 16 Oct 2015 22:52:38 -0400 Subject: [PATCH] Core: Move a global into a namespace --- Source/Core/Core/Core.cpp | 6 +++--- Source/Core/Core/Core.h | 6 +++--- Source/Core/VideoCommon/RenderBase.cpp | 6 +++--- Source/Core/VideoCommon/VertexShaderManager.cpp | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 45740b1f6c..61e1f14be5 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -74,12 +74,12 @@ #define ThreadLocalStorage __thread #endif -// TODO: ugly, remove -bool g_aspect_wide; - namespace Core { +// TODO: ugly, remove +bool g_aspect_wide; + bool g_want_determinism; // Declarations and definitions diff --git a/Source/Core/Core/Core.h b/Source/Core/Core/Core.h index 0bafa5e2d9..76015a44b1 100644 --- a/Source/Core/Core/Core.h +++ b/Source/Core/Core/Core.h @@ -16,12 +16,12 @@ #include "Common/CommonTypes.h" -// TODO: ugly, remove -extern bool g_aspect_wide; - namespace Core { +// TODO: ugly, remove +extern bool g_aspect_wide; + extern bool g_want_determinism; bool GetIsFramelimiterTempDisabled(); diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index a35e3fe94e..75d646adc7 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -431,7 +431,7 @@ void Renderer::UpdateDrawRectangle(int backbuffer_width, int backbuffer_height) // Don't know if there is a better place for this code so there isn't a 1 frame delay if (g_ActiveConfig.bWidescreenHack) { - float source_aspect = VideoInterface::GetAspectRatio(g_aspect_wide); + float source_aspect = VideoInterface::GetAspectRatio(Core::g_aspect_wide); float target_aspect; switch (g_ActiveConfig.iAspectRatio) @@ -485,7 +485,7 @@ void Renderer::UpdateDrawRectangle(int backbuffer_width, int backbuffer_height) Ratio = (WinWidth / WinHeight) / VideoInterface::GetAspectRatio(false); break; default: - Ratio = (WinWidth / WinHeight) / VideoInterface::GetAspectRatio(g_aspect_wide); + Ratio = (WinWidth / WinHeight) / VideoInterface::GetAspectRatio(Core::g_aspect_wide); break; } @@ -521,7 +521,7 @@ void Renderer::UpdateDrawRectangle(int backbuffer_width, int backbuffer_height) Ratio = (4.0f / 3.0f) / VideoInterface::GetAspectRatio(false); break; default: - Ratio = (!g_aspect_wide ? (4.0f / 3.0f) : (16.0f / 9.0f)) / VideoInterface::GetAspectRatio(g_aspect_wide); + Ratio = (!Core::g_aspect_wide ? (4.0f / 3.0f) : (16.0f / 9.0f)) / VideoInterface::GetAspectRatio(Core::g_aspect_wide); break; } if (Ratio <= 1.0f) diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp index 2e06a5f267..8c8f08b154 100644 --- a/Source/Core/VideoCommon/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/VertexShaderManager.cpp @@ -443,9 +443,9 @@ void VertexShaderManager::SetConstants() { bool viewport_is_4_3 = AspectIs4_3(xfmem.viewport.wd, xfmem.viewport.ht); if (AspectIs16_9(rawProjection[2], rawProjection[0]) && viewport_is_4_3) - g_aspect_wide = true; // Projection is 16:9 and viewport is 4:3, we are rendering an anamorphic widescreen picture + Core::g_aspect_wide = true; // Projection is 16:9 and viewport is 4:3, we are rendering an anamorphic widescreen picture else if (AspectIs4_3(rawProjection[2], rawProjection[0]) && viewport_is_4_3) - g_aspect_wide = false; // Project and viewports are both 4:3, we are rendering a normal image. + Core::g_aspect_wide = false; // Project and viewports are both 4:3, we are rendering a normal image. } SETSTAT_FT(stats.gproj_0, g_fProjectionMatrix[0]);