From 7ae71e643e3e3510ecf610c6dab00a79110eced7 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Fri, 22 Apr 2022 16:37:43 -0700 Subject: [PATCH] Vulkan: Close the output stream on shader compile error before showing the panic alert This fixes the file showing up as 0 bytes in Windows Explorer (although the file would still display properly when opened). --- Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp b/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp index 7da5f827d4..80f9242d83 100644 --- a/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp +++ b/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp @@ -171,6 +171,7 @@ static std::optional CompileShaderToSPV(EShLanguage stage, stream << "\n"; stream << "Dolphin Version: " + Common::GetScmRevStr() + "\n"; stream << "Video Backend: " + g_video_backend->GetDisplayName(); + stream.close(); PanicAlertFmt("{} (written to {})", msg, filename); };