summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexShaderManager.cpp
diff options
context:
space:
mode:
authorLC <mathew1800@gmail.com>2020-12-24 15:10:17 -0500
committerGitHub <noreply@github.com>2020-12-24 15:10:17 -0500
commit26c097ebfcf587b5656247d8f9f8c3ec75e51ce5 (patch)
tree653dad4676c2c07999fea8acde8a0780fee9a0d8 /Source/Core/VideoCommon/VertexShaderManager.cpp
parentd61c64684b8b02806e178531c33076ddffc71f40 (diff)
parentc7b24d6213f638c4e6fb2099a36f033f36d761b0 (diff)
Merge pull request #8867 from iwubcode/freelook_controller
Make Free Look a proper controller, move to separate UI
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexShaderManager.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp
index 04cb3b2f6f..9c82d9b431 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<void*>(&xfmem), 0, sizeof(xfmem));
constants = {};
@@ -357,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;
@@ -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 (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));