From c7b24d6213f638c4e6fb2099a36f033f36d761b0 Mon Sep 17 00:00:00 2001 From: iwubcode Date: Sun, 6 Dec 2020 12:03:50 -0600 Subject: [PATCH] VideoCommon: Update active config when we check for config changes, this ensures Free Look settings are copied at the start of the frame. Also update the camera's controller type at this time --- Source/Core/VideoCommon/RenderBase.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index acd1cdb7a1..8cc777d173 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -45,6 +45,7 @@ #include "Core/ConfigManager.h" #include "Core/Core.h" #include "Core/FifoPlayer/FifoRecorder.h" +#include "Core/FreeLookConfig.h" #include "Core/HW/SystemTimers.h" #include "Core/HW/VideoInterface.h" #include "Core/Host.h" @@ -63,6 +64,7 @@ #include "VideoCommon/FrameDump.h" #include "VideoCommon/FramebufferManager.h" #include "VideoCommon/FramebufferShaderGen.h" +#include "VideoCommon/FreeLookCamera.h" #include "VideoCommon/NetPlayChatUI.h" #include "VideoCommon/NetPlayGolfUI.h" #include "VideoCommon/OnScreenDisplay.h" @@ -104,6 +106,7 @@ Renderer::Renderer(int backbuffer_width, int backbuffer_height, float backbuffer MAX_XFB_HEIGHT} { UpdateActiveConfig(); + FreeLook::UpdateActiveConfig(); UpdateDrawRectangle(); CalculateTargetSize(); @@ -401,6 +404,9 @@ void Renderer::CheckForConfigChanges() const bool old_bbox = g_ActiveConfig.bBBoxEnable; UpdateActiveConfig(); + FreeLook::UpdateActiveConfig(); + + g_freelook_camera.SetControlType(FreeLook::GetActiveConfig().camera_config.control_type); // Update texture cache settings with any changed options. g_texture_cache->OnConfigChanged(g_ActiveConfig);