Merge pull request #8293 from lioncash/ref

VideoCommon/TextureCacheBase: Make OnConfigChanged's parameter a const reference
This commit is contained in:
Connor McLaughlin 2019-08-08 12:17:26 +10:00 committed by GitHub
commit 9477c8b0ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -134,7 +134,7 @@ void TextureCacheBase::Invalidate()
texture_pool.clear(); texture_pool.clear();
} }
void TextureCacheBase::OnConfigChanged(VideoConfig& config) void TextureCacheBase::OnConfigChanged(const VideoConfig& config)
{ {
if (config.bHiresTextures != backup_config.hires_textures || if (config.bHiresTextures != backup_config.hires_textures ||
config.bCacheHiresTextures != backup_config.cache_hires_textures) config.bCacheHiresTextures != backup_config.cache_hires_textures)
@ -152,9 +152,7 @@ void TextureCacheBase::OnConfigChanged(VideoConfig& config)
config.bArbitraryMipmapDetection != backup_config.arbitrary_mipmap_detection) config.bArbitraryMipmapDetection != backup_config.arbitrary_mipmap_detection)
{ {
Invalidate(); Invalidate();
TexDecoder_SetTexFmtOverlayOptions(config.bTexFmtOverlayEnable, config.bTexFmtOverlayCenter);
TexDecoder_SetTexFmtOverlayOptions(g_ActiveConfig.bTexFmtOverlayEnable,
g_ActiveConfig.bTexFmtOverlayCenter);
} }
SetBackupConfig(config); SetBackupConfig(config);

View File

@ -204,7 +204,7 @@ public:
bool Initialize(); bool Initialize();
void OnConfigChanged(VideoConfig& config); void OnConfigChanged(const VideoConfig& config);
// Removes textures which aren't used for more than TEXTURE_KILL_THRESHOLD frames, // Removes textures which aren't used for more than TEXTURE_KILL_THRESHOLD frames,
// frameCount is the current frame number. // frameCount is the current frame number.