Hot reload done only once every 200 ms, no point in beeing faster

it may also help with bugs where the file is still locked and can't be opened
remove_forgotten_code
florent.teppe 2 years ago
parent 15751c57a0
commit 3ab0a99154

@ -387,7 +387,8 @@ namespace Shader
void update(ShaderManager& Manager)
{
if (mHotReloadEnabled)
auto timeSinceLastCheckMillis = std::chrono::duration_cast<std::chrono::milliseconds>(std::filesystem::file_time_type::clock::now() - mLastAutoRecompileTime);
if (mHotReloadEnabled && timeSinceLastCheckMillis.count() > 200)
reloadTouchedShaders(Manager);
}

Loading…
Cancel
Save