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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user