mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-18 00:45:39 -04: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 commit 92f3b4ba82e96d53e36212d3e824de4d13551552) 0f9a7594 wait a brief moment before reading a file marked as modified
This commit is contained in:
parent
341161ba03
commit
bbfc573b15
@ -1,6 +1,8 @@
|
|||||||
#include "postprocessor.hpp"
|
#include "postprocessor.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <chrono>
|
||||||
|
#include <thread>
|
||||||
#include <SDL_opengl_glext.h>
|
#include <SDL_opengl_glext.h>
|
||||||
|
|
||||||
#include <osg/Texture1D>
|
#include <osg/Texture1D>
|
||||||
@ -376,6 +378,10 @@ namespace MWRender
|
|||||||
if (!isDirty)
|
if (!isDirty)
|
||||||
continue;
|
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())
|
if (technique->compile())
|
||||||
Log(Debug::Info) << "Reloaded technique : " << mTechniqueFileMap[technique->getName()].string();
|
Log(Debug::Info) << "Reloaded technique : " << mTechniqueFileMap[technique->getName()].string();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user