mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
(svn r23987) -Fix (r23000): Also reset the font glyph cache when switching blitters.
This commit is contained in:
parent
3d381403a8
commit
df54f25efe
@ -974,6 +974,14 @@ void UninitFreeType()
|
|||||||
_library = NULL;
|
_library = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset cached glyphs.
|
||||||
|
*/
|
||||||
|
void ClearFontCache()
|
||||||
|
{
|
||||||
|
ResetGlyphCache(true);
|
||||||
|
ResetGlyphCache(false);
|
||||||
|
}
|
||||||
|
|
||||||
static FT_Face GetFontFace(FontSize size)
|
static FT_Face GetFontFace(FontSize size)
|
||||||
{
|
{
|
||||||
|
@ -44,6 +44,7 @@ extern FreeTypeSettings _freetype;
|
|||||||
|
|
||||||
void InitFreeType(bool monospace);
|
void InitFreeType(bool monospace);
|
||||||
void UninitFreeType();
|
void UninitFreeType();
|
||||||
|
void ClearFontCache();
|
||||||
const Sprite *GetGlyph(FontSize size, uint32 key);
|
const Sprite *GetGlyph(FontSize size, uint32 key);
|
||||||
uint GetGlyphWidth(FontSize size, uint32 key);
|
uint GetGlyphWidth(FontSize size, uint32 key);
|
||||||
bool GetDrawGlyphShadow();
|
bool GetDrawGlyphShadow();
|
||||||
|
@ -256,6 +256,7 @@ void GfxLoadSprites()
|
|||||||
DEBUG(sprite, 2, "Loading sprite set %d", _settings_game.game_creation.landscape);
|
DEBUG(sprite, 2, "Loading sprite set %d", _settings_game.game_creation.landscape);
|
||||||
|
|
||||||
SwitchNewGRFBlitter();
|
SwitchNewGRFBlitter();
|
||||||
|
ClearFontCache();
|
||||||
GfxInitSpriteMem();
|
GfxInitSpriteMem();
|
||||||
LoadSpriteTables();
|
LoadSpriteTables();
|
||||||
GfxInitPalettes();
|
GfxInitPalettes();
|
||||||
|
Loading…
Reference in New Issue
Block a user