From f6ab9a9b6f4857fb462a4d685222ccbd7303f1ea Mon Sep 17 00:00:00 2001 From: iwubcode Date: Wed, 22 Jul 2020 19:19:18 -0500 Subject: Core / VideoCommon: Remove old Free Look config --- Source/Core/VideoCommon/VertexShaderManager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/VertexShaderManager.cpp') diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp index 04cb3b2f6f..174ab70316 100644 --- a/Source/Core/VideoCommon/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/VertexShaderManager.cpp @@ -112,7 +112,6 @@ void VertexShaderManager::Init() bViewportChanged = false; bTexMtxInfoChanged = false; bLightingConfigChanged = false; - g_freelook_camera.SetControlType(Config::Get(Config::GFX_FREE_LOOK_CONTROL_TYPE)); std::memset(static_cast(&xfmem), 0, sizeof(xfmem)); constants = {}; @@ -420,7 +419,7 @@ void VertexShaderManager::SetConstants() auto corrected_matrix = s_viewportCorrection * Common::Matrix44::FromArray(g_fProjectionMatrix); - if (g_ActiveConfig.bFreeLook && xfmem.projection.type == GX_PERSPECTIVE) + if (xfmem.projection.type == GX_PERSPECTIVE) corrected_matrix *= g_freelook_camera.GetView(); memcpy(constants.projection.data(), corrected_matrix.data.data(), 4 * sizeof(float4)); -- cgit v1.2.3 From bcf63c463b5b90c03c5d48b29ac1b2eb3ee9588f Mon Sep 17 00:00:00 2001 From: iwubcode Date: Thu, 18 Jun 2020 23:49:07 -0500 Subject: VideoCommon: Add 'Active' state to FreelookCamera to future proof if we ever add multiple cameras --- Source/Core/VideoCommon/VertexShaderManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/VertexShaderManager.cpp') diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp index 174ab70316..9c82d9b431 100644 --- a/Source/Core/VideoCommon/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/VertexShaderManager.cpp @@ -356,7 +356,7 @@ void VertexShaderManager::SetConstants() case GX_PERSPECTIVE: { const Common::Vec2 fov = - g_ActiveConfig.bFreeLook ? g_freelook_camera.GetFieldOfView() : Common::Vec2{1, 1}; + g_freelook_camera.IsActive() ? g_freelook_camera.GetFieldOfView() : Common::Vec2{1, 1}; g_fProjectionMatrix[0] = rawProjection[0] * g_ActiveConfig.fAspectRatioHackW * fov.x; g_fProjectionMatrix[1] = 0.0f; g_fProjectionMatrix[2] = rawProjection[1] * g_ActiveConfig.fAspectRatioHackW * fov.x; @@ -419,7 +419,7 @@ void VertexShaderManager::SetConstants() auto corrected_matrix = s_viewportCorrection * Common::Matrix44::FromArray(g_fProjectionMatrix); - if (xfmem.projection.type == GX_PERSPECTIVE) + if (g_freelook_camera.IsActive() && xfmem.projection.type == GX_PERSPECTIVE) corrected_matrix *= g_freelook_camera.GetView(); memcpy(constants.projection.data(), corrected_matrix.data.data(), 4 * sizeof(float4)); -- cgit v1.2.3