mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 13:49:40 +00:00
Stop viewer threading before changing MyGUI textures
This commit is contained in:
parent
00f4f78717
commit
483dc9de45
2 changed files with 6 additions and 0 deletions
|
@ -1092,7 +1092,11 @@ namespace MWGui
|
||||||
else if (it->first == "GUI" && it->second == "subtitles")
|
else if (it->first == "GUI" && it->second == "subtitles")
|
||||||
mSubtitlesEnabled = Settings::Manager::getBool ("subtitles", "GUI");
|
mSubtitlesEnabled = Settings::Manager::getBool ("subtitles", "GUI");
|
||||||
else if (it->first == "GUI" && it->second == "menu transparency")
|
else if (it->first == "GUI" && it->second == "menu transparency")
|
||||||
|
{
|
||||||
|
mViewer->stopThreading();
|
||||||
setMenuTransparency(Settings::Manager::getFloat("menu transparency", "GUI"));
|
setMenuTransparency(Settings::Manager::getFloat("menu transparency", "GUI"));
|
||||||
|
mViewer->startThreading();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,8 @@ namespace osgMyGUI
|
||||||
|
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
|
||||||
|
/// @warning If you intend to change a texture during the frame update, you must either declare the texture with DataVariance::DYNAMIC
|
||||||
|
/// or temporarily stop the viewer threading, to prevent race conditions with the draw thread.
|
||||||
virtual void* lock(MyGUI::TextureUsage access);
|
virtual void* lock(MyGUI::TextureUsage access);
|
||||||
virtual void unlock();
|
virtual void unlock();
|
||||||
virtual bool isLocked();
|
virtual bool isLocked();
|
||||||
|
|
Loading…
Reference in a new issue