mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-11 14:06:42 +00:00
Makes sure threads are only stopped once ,and that they will be re-started
This commit is contained in:
parent
16a4b5716b
commit
166717d601
1 changed files with 6 additions and 3 deletions
|
@ -405,10 +405,13 @@ namespace Shader
|
||||||
|
|
||||||
std::filesystem::file_time_type write_time = std::filesystem::last_write_time(pathShaderToTest);
|
std::filesystem::file_time_type write_time = std::filesystem::last_write_time(pathShaderToTest);
|
||||||
if (write_time.time_since_epoch() > mLastAutoRecompileTime.time_since_epoch())
|
if (write_time.time_since_epoch() > mLastAutoRecompileTime.time_since_epoch())
|
||||||
|
{
|
||||||
|
if (!threadsRunningTostop)
|
||||||
{
|
{
|
||||||
threadsRunningTostop = viewer.areThreadsRunning();
|
threadsRunningTostop = viewer.areThreadsRunning();
|
||||||
if (threadsRunningTostop)
|
if (threadsRunningTostop)
|
||||||
viewer.stopThreading();
|
viewer.stopThreading();
|
||||||
|
}
|
||||||
|
|
||||||
for (const auto& [templateName, shaderDefines]: shaderKeys)
|
for (const auto& [templateName, shaderDefines]: shaderKeys)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue