diff options
Diffstat (limited to 'src/menu')
-rw-r--r-- | src/menu/text.cpp | 5 | ||||
-rw-r--r-- | src/menu/text.hpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/menu/text.cpp b/src/menu/text.cpp index 8e3ae04a..d5e658e1 100644 --- a/src/menu/text.cpp +++ b/src/menu/text.cpp @@ -59,13 +59,14 @@ namespace usdx glScalef(1, -1, 1); { - boost::mutex::scoped_lock lock(text_mutex); + boost::mutex::scoped_lock lock(font_mutex); font->Render(text.c_str()); } } void Text::set_font_size(unsigned int value) { + boost::mutex::scoped_lock lock(font_mutex); font->FaceSize(value); } @@ -76,7 +77,7 @@ namespace usdx void Text::set_text(const std::string value) { - boost::mutex::scoped_lock lock(text_mutex); + boost::mutex::scoped_lock lock(font_mutex); text = value; } diff --git a/src/menu/text.hpp b/src/menu/text.hpp index 9c910b98..ad5fcb9a 100644 --- a/src/menu/text.hpp +++ b/src/menu/text.hpp @@ -63,8 +63,8 @@ namespace usdx bool stretch; FTFont *font; + boost::mutex font_mutex; - boost::mutex text_mutex; protected: virtual void draw(void); |