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:
parent
15751c57a0
commit
3ab0a99154
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue