From 7d017be66691bf4ac633d6c75f224a0814e1d049 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 4 Aug 2019 22:31:25 -0400 Subject: VideoCommon/TextureCacheBase: Make OnConfigChanged's parameter a const reference This reference isn't actually modified within this function --- Source/Core/VideoCommon/TextureCacheBase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp') diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 2f330bb2bc..3e42f042ba 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -137,7 +137,7 @@ void TextureCacheBase::Invalidate() texture_pool.clear(); } -void TextureCacheBase::OnConfigChanged(VideoConfig& config) +void TextureCacheBase::OnConfigChanged(const VideoConfig& config) { if (config.bHiresTextures != backup_config.hires_textures || config.bCacheHiresTextures != backup_config.cache_hires_textures) -- cgit v1.2.3 From 86a651e27f22215752a444a83ae258ae3efd832a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 4 Aug 2019 22:33:15 -0400 Subject: VideoCommon/TextureCacheBase: Remove dependence on global variables from OnConfigChanged() The active config will always be passed as the reference parameter, we can make use of the parameter instead of accessing the global variable. --- Source/Core/VideoCommon/TextureCacheBase.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp') diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 3e42f042ba..5d18eafbc3 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -155,9 +155,7 @@ void TextureCacheBase::OnConfigChanged(const VideoConfig& config) config.bArbitraryMipmapDetection != backup_config.arbitrary_mipmap_detection) { Invalidate(); - - TexDecoder_SetTexFmtOverlayOptions(g_ActiveConfig.bTexFmtOverlayEnable, - g_ActiveConfig.bTexFmtOverlayCenter); + TexDecoder_SetTexFmtOverlayOptions(config.bTexFmtOverlayEnable, config.bTexFmtOverlayCenter); } SetBackupConfig(config); -- cgit v1.2.3