1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 02:15:34 +00:00

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:
florent.teppe 2022-08-04 13:37:12 +02:00
parent 15751c57a0
commit 3ab0a99154

View file

@ -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);
}