summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2022-04-22 16:37:43 -0700
committerPokechu22 <Pokechu022@gmail.com>2022-04-22 16:37:43 -0700
commit7ae71e643e3e3510ecf610c6dab00a79110eced7 (patch)
tree6fec7cc5f350bff03333cc4de9b9fabf955673a2
parent2e01dc0c82b5f73215e3425ab45ff6c7ee50b389 (diff)
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).
-rw-r--r--Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp1
1 files changed, 1 insertions, 0 deletions
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<SPIRVCodeVector> 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);
};