mirror of
https://github.com/Retropex/dolphin.git
synced 2025-06-03 07:52:32 +02:00
VertexShaderManager: Avoid accessing freelook control type configuration each call which caused a performance hit, move check to RenderBase where it is checked when config changes
This commit is contained in:
parent
d6341c4117
commit
0441d6aa5e
@ -63,6 +63,7 @@
|
|||||||
#include "VideoCommon/FrameDump.h"
|
#include "VideoCommon/FrameDump.h"
|
||||||
#include "VideoCommon/FramebufferManager.h"
|
#include "VideoCommon/FramebufferManager.h"
|
||||||
#include "VideoCommon/FramebufferShaderGen.h"
|
#include "VideoCommon/FramebufferShaderGen.h"
|
||||||
|
#include "VideoCommon/FreeLookCamera.h"
|
||||||
#include "VideoCommon/ImageWrite.h"
|
#include "VideoCommon/ImageWrite.h"
|
||||||
#include "VideoCommon/NetPlayChatUI.h"
|
#include "VideoCommon/NetPlayChatUI.h"
|
||||||
#include "VideoCommon/NetPlayGolfUI.h"
|
#include "VideoCommon/NetPlayGolfUI.h"
|
||||||
@ -406,6 +407,11 @@ void Renderer::CheckForConfigChanges()
|
|||||||
|
|
||||||
UpdateActiveConfig();
|
UpdateActiveConfig();
|
||||||
|
|
||||||
|
if (g_ActiveConfig.bFreeLook)
|
||||||
|
{
|
||||||
|
g_freelook_camera.SetControlType(g_ActiveConfig.iFreelookControlType);
|
||||||
|
}
|
||||||
|
|
||||||
// Update texture cache settings with any changed options.
|
// Update texture cache settings with any changed options.
|
||||||
g_texture_cache->OnConfigChanged(g_ActiveConfig);
|
g_texture_cache->OnConfigChanged(g_ActiveConfig);
|
||||||
|
|
||||||
|
@ -449,9 +449,6 @@ void VertexShaderManager::SetConstants()
|
|||||||
|
|
||||||
dirty = true;
|
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)
|
void VertexShaderManager::InvalidateXFRange(int start, int end)
|
||||||
|
@ -91,6 +91,7 @@ void VideoConfig::Refresh()
|
|||||||
bDumpXFBTarget = Config::Get(Config::GFX_DUMP_XFB_TARGET);
|
bDumpXFBTarget = Config::Get(Config::GFX_DUMP_XFB_TARGET);
|
||||||
bDumpFramesAsImages = Config::Get(Config::GFX_DUMP_FRAMES_AS_IMAGES);
|
bDumpFramesAsImages = Config::Get(Config::GFX_DUMP_FRAMES_AS_IMAGES);
|
||||||
bFreeLook = Config::Get(Config::GFX_FREE_LOOK);
|
bFreeLook = Config::Get(Config::GFX_FREE_LOOK);
|
||||||
|
iFreelookControlType = Config::Get(Config::GFX_FREE_LOOK_CONTROL_TYPE);
|
||||||
bUseFFV1 = Config::Get(Config::GFX_USE_FFV1);
|
bUseFFV1 = Config::Get(Config::GFX_USE_FFV1);
|
||||||
sDumpFormat = Config::Get(Config::GFX_DUMP_FORMAT);
|
sDumpFormat = Config::Get(Config::GFX_DUMP_FORMAT);
|
||||||
sDumpCodec = Config::Get(Config::GFX_DUMP_CODEC);
|
sDumpCodec = Config::Get(Config::GFX_DUMP_CODEC);
|
||||||
|
Loading…
Reference in New Issue
Block a user