From f0d97bfdb91a2c0a17d1697b145d4df930280dbb Mon Sep 17 00:00:00 2001 From: krzys-h Date: Sun, 18 May 2014 12:12:47 +0200 Subject: Better datadir mod support --- src/graphics/engine/text.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/graphics/engine/text.cpp') diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index d0c9cc8..8fd01b7 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -19,6 +19,7 @@ #include "graphics/engine/text.h" #include "app/app.h" +#include "app/gamedata.h" #include "common/image.h" #include "common/logger.h" @@ -865,7 +866,7 @@ CachedFont* CText::GetOrOpenFont(FontType font, float size) return m_lastCachedFont; } - std::string path = CApplication::GetInstance().GetDataFilePath(DIR_FONT, mf->fileName); + std::string path = CGameData::GetInstancePointer()->GetFilePath(DIR_FONT, mf->fileName); m_lastCachedFont = new CachedFont(); m_lastCachedFont->font = TTF_OpenFont(path.c_str(), pointSize); -- cgit v1.2.3-1-g7c22