diff options
author | sapier <Sapier at GMX dot net> | 2014-11-28 20:06:34 +0100 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2014-11-30 18:06:54 +0100 |
commit | 39162de15a2603f1282241aef412ef1b70162b27 (patch) | |
tree | ddcd0c42420093eaebdda13ed10101308af345dc /src/fontengine.cpp | |
parent | d1d6a97b1cd05ec34358b6519fc232fc158cf521 (diff) | |
download | minetest-39162de15a2603f1282241aef412ef1b70162b27.tar.gz minetest-39162de15a2603f1282241aef412ef1b70162b27.tar.bz2 minetest-39162de15a2603f1282241aef412ef1b70162b27.zip |
Make hud use fontengine too
Fix non coding style conforming glb_fontengine to g_fontengine
Fix fonts never been deleted due to grabbed to often
Diffstat (limited to 'src/fontengine.cpp')
-rw-r--r-- | src/fontengine.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/fontengine.cpp b/src/fontengine.cpp index c1e36d6c8..f73f47ff7 100644 --- a/src/fontengine.cpp +++ b/src/fontengine.cpp @@ -33,11 +33,11 @@ with this program; if not, write to the Free Software Foundation, Inc., #define MAX_FONT_SIZE_OFFSET 10 /** reference to access font engine, has to be initialized by main */ -FontEngine* glb_fontengine = NULL; +FontEngine* g_fontengine = NULL; /** callback to be used on change of font size setting */ static void font_setting_changed(const std::string) { - glb_fontengine->readSettings(); + g_fontengine->readSettings(); } /******************************************************************************/ @@ -349,7 +349,6 @@ void FontEngine::initFont(unsigned int basesize, FontMode mode) font_shadow_alpha); if (font != NULL) { - font->grab(); m_font_cache[mode][basesize] = font; } else { @@ -457,7 +456,6 @@ void FontEngine::initSimpleFont(unsigned int basesize, FontMode mode) } if (font != NULL) { - font->grab(); m_font_cache[mode][basesize] = font; } } |