mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Stop viewer threading before changing MyGUI textures
This commit is contained in:
parent
00f4f78717
commit
483dc9de45
@ -1092,7 +1092,11 @@ namespace MWGui
|
||||
else if (it->first == "GUI" && it->second == "subtitles")
|
||||
mSubtitlesEnabled = Settings::Manager::getBool ("subtitles", "GUI");
|
||||
else if (it->first == "GUI" && it->second == "menu transparency")
|
||||
{
|
||||
mViewer->stopThreading();
|
||||
setMenuTransparency(Settings::Manager::getFloat("menu transparency", "GUI"));
|
||||
mViewer->startThreading();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,8 @@ namespace osgMyGUI
|
||||
|
||||
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 unlock();
|
||||
virtual bool isLocked();
|
||||
|
Loading…
Reference in New Issue
Block a user