mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-25 18:09:42 +00:00
Merge branch 'windows_save' into 'master'
[Postprocessing] Mitigate clashes with live reload and external saves on windows See merge request OpenMW/openmw!2237 (cherry picked from commit92f3b4ba82
)0f9a7594
wait a brief moment before reading a file marked as modified
This commit is contained in:
parent
341161ba03
commit
bbfc573b15
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>
|
||||
|
@ -376,6 +378,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