diff options
| author | Léo Lam <leo@leolam.fr> | 2021-02-12 02:41:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-12 02:41:11 +0100 |
| commit | 38935f2e4e93a91acebd08c51e4811e0bc487670 (patch) | |
| tree | f7b1050e259f2a4a6f6d07b0a1986a3ea439aa54 /Source/Core/VideoCommon/HiresTextures.cpp | |
| parent | 0f29e36440f0c1fc14e104577345779687593da1 (diff) | |
| parent | ce7db2e32bb60d4ef5f107dc913ff19f9ad39057 (diff) | |
Merge pull request #9488 from iwubcode/dynamic-input-tex-optimizations
InputCommon: fix potential dynamic input texture crash and an optimization
Diffstat (limited to 'Source/Core/VideoCommon/HiresTextures.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/HiresTextures.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/HiresTextures.cpp b/Source/Core/VideoCommon/HiresTextures.cpp index cbb2566470..d55eadf022 100644 --- a/Source/Core/VideoCommon/HiresTextures.cpp +++ b/Source/Core/VideoCommon/HiresTextures.cpp @@ -56,14 +56,7 @@ void HiresTexture::Init() void HiresTexture::Shutdown() { - if (s_prefetcher.joinable()) - { - s_textureCacheAbortLoading.Set(); - s_prefetcher.join(); - } - - s_textureMap.clear(); - s_textureCache.clear(); + Clear(); } void HiresTexture::Update() @@ -147,6 +140,11 @@ void HiresTexture::Update() void HiresTexture::Clear() { + if (s_prefetcher.joinable()) + { + s_textureCacheAbortLoading.Set(); + s_prefetcher.join(); + } s_textureMap.clear(); s_textureCache.clear(); } |
