1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 00:32:49 +00:00

Makes sure threads are only stopped once ,and that they will be re-started

This commit is contained in:
florent.teppe 2022-08-13 00:34:01 +02:00
parent 16a4b5716b
commit 166717d601

View File

@ -406,9 +406,12 @@ namespace Shader
std::filesystem::file_time_type write_time = std::filesystem::last_write_time(pathShaderToTest);
if (write_time.time_since_epoch() > mLastAutoRecompileTime.time_since_epoch())
{
threadsRunningTostop = viewer.areThreadsRunning();
if (threadsRunningTostop)
viewer.stopThreading();
if (!threadsRunningTostop)
{
threadsRunningTostop = viewer.areThreadsRunning();
if (threadsRunningTostop)
viewer.stopThreading();
}
for (const auto& [templateName, shaderDefines]: shaderKeys)
{