From 61ca1fb82662b945ace3db89b0911caae4a079d7 Mon Sep 17 00:00:00 2001 From: Lucas Alber Date: Tue, 6 Aug 2024 19:33:32 +0200 Subject: [PATCH] fix build? --- src/merian/vk/shader/shader_hotreloader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/merian/vk/shader/shader_hotreloader.cpp b/src/merian/vk/shader/shader_hotreloader.cpp index d20c607..4ffb769 100644 --- a/src/merian/vk/shader/shader_hotreloader.cpp +++ b/src/merian/vk/shader/shader_hotreloader.cpp @@ -1,5 +1,7 @@ #include "merian/vk/shader/shader_hotreloader.hpp" +#include + namespace merian { ShaderModuleHandle @@ -16,7 +18,7 @@ HotReloader::get_shader(const std::filesystem::path& path, std::filesystem::last_write_time(*canonical); if (!shaders.contains(*canonical) || - (clock_cast(std::chrono::system_clock::now() - 200ms) > + (std::chrono::clock_cast(std::chrono::system_clock::now() - 200ms) > last_write_time && last_write_time > shaders[*canonical].last_write_time)) { // wait additional 200ms, else the write to the file might still be in process.