mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-25 21:39:42 +00:00
wait a brief moment before reading a file marked as modified
This commit is contained in:
parent
caf971b979
commit
0f9a7594bb
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
|||
#include "postprocessor.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include <SDL_opengl_glext.h>
|
||||
|
||||
#include <osg/Texture1D>
|
||||
|
@ -385,6 +387,10 @@ namespace MWRender
|
|||
if (!isDirty)
|
||||
continue;
|
||||
|
||||
// TODO: Temporary workaround to avoid conflicts with external programs saving the file, especially problematic on Windows.
|
||||
// If we move to a file watcher using native APIs this should be removed.
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(5));
|
||||
|
||||
if (technique->compile())
|
||||
Log(Debug::Info) << "Reloaded technique : " << mTechniqueFileMap[technique->getName()].string();
|
||||
|
||||
|
|
Loading…
Reference in a new issue