From 0b559fb8720877036c46ef28ba46204cf1b52efc Mon Sep 17 00:00:00 2001 From: goeiecool9999 <7033575+goeiecool9999@users.noreply.github.com> Date: Tue, 5 Nov 2024 21:04:36 +0100 Subject: [PATCH] Fix imgui texture leak if shadercache loading is interrupted --- src/Cafe/HW/Latte/Core/LatteShaderCache.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Cafe/HW/Latte/Core/LatteShaderCache.cpp b/src/Cafe/HW/Latte/Core/LatteShaderCache.cpp index 9576eb2e2..cb077b410 100644 --- a/src/Cafe/HW/Latte/Core/LatteShaderCache.cpp +++ b/src/Cafe/HW/Latte/Core/LatteShaderCache.cpp @@ -365,6 +365,9 @@ void LatteShaderCache_Load() g_renderer->DeleteTexture(g_shaderCacheLoaderState.textureTVId); if (g_shaderCacheLoaderState.textureDRCId) g_renderer->DeleteTexture(g_shaderCacheLoaderState.textureDRCId); + + if(Latte_GetStopSignal()) + LatteThread_Exit(); } void LatteShaderCache_ShowProgress(const std::function & loadUpdateFunc, bool isPipelines) @@ -505,8 +508,6 @@ void LatteShaderCache_LoadVulkanPipelineCache(uint64 cacheTitleId) g_shaderCacheLoaderState.loadedPipelines = 0; LatteShaderCache_ShowProgress(LatteShaderCache_updatePipelineLoadingProgress, true); pipelineCache.EndLoading(); - if(Latte_GetStopSignal()) - LatteThread_Exit(); } bool LatteShaderCache_updatePipelineLoadingProgress()