Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #8884 from iwubcode/freelook_performance_fix
VertexShaderManager: Only look for freelook config changes if we're using freelook
  • Loading branch information
stenzek committed Jul 4, 2020
2 parents 38b3653 + 0441d6a commit 9c12a84
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Source/Core/VideoCommon/RenderBase.cpp
Expand Up @@ -63,6 +63,7 @@
#include "VideoCommon/FrameDump.h"
#include "VideoCommon/FramebufferManager.h"
#include "VideoCommon/FramebufferShaderGen.h"
#include "VideoCommon/FreeLookCamera.h"
#include "VideoCommon/ImageWrite.h"
#include "VideoCommon/NetPlayChatUI.h"
#include "VideoCommon/NetPlayGolfUI.h"
Expand Down Expand Up @@ -406,6 +407,11 @@ void Renderer::CheckForConfigChanges()

UpdateActiveConfig();

if (g_ActiveConfig.bFreeLook)
{
g_freelook_camera.SetControlType(g_ActiveConfig.iFreelookControlType);
}

// Update texture cache settings with any changed options.
g_texture_cache->OnConfigChanged(g_ActiveConfig);

Expand Down
3 changes: 0 additions & 3 deletions Source/Core/VideoCommon/VertexShaderManager.cpp
Expand Up @@ -455,9 +455,6 @@ void VertexShaderManager::SetConstants()

dirty = true;
}

// Handle a potential config change
g_freelook_camera.SetControlType(Config::Get(Config::GFX_FREE_LOOK_CONTROL_TYPE));
}

void VertexShaderManager::InvalidateXFRange(int start, int end)
Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoCommon/VideoConfig.cpp
Expand Up @@ -91,6 +91,7 @@ void VideoConfig::Refresh()
bDumpXFBTarget = Config::Get(Config::GFX_DUMP_XFB_TARGET);
bDumpFramesAsImages = Config::Get(Config::GFX_DUMP_FRAMES_AS_IMAGES);
bFreeLook = Config::Get(Config::GFX_FREE_LOOK);
iFreelookControlType = Config::Get(Config::GFX_FREE_LOOK_CONTROL_TYPE);
bUseFFV1 = Config::Get(Config::GFX_USE_FFV1);
sDumpFormat = Config::Get(Config::GFX_DUMP_FORMAT);
sDumpCodec = Config::Get(Config::GFX_DUMP_CODEC);
Expand Down

0 comments on commit 9c12a84

Please sign in to comment.