diff --git a/src/TextDrawer.cpp b/src/TextDrawer.cpp index ec1a644b..ae61e31e 100644 --- a/src/TextDrawer.cpp +++ b/src/TextDrawer.cpp @@ -25,6 +25,11 @@ #include "TextDrawer.h" +#ifdef MUPENPLUSAPI +#include "mupenplus/GLideN64_mupenplus.h" +#include +#endif + using namespace graphics; // Maximum texture width @@ -203,7 +208,14 @@ bool getFontFileName(char * _strName) #elif defined (PANDORA) sprintf(_strName, "/usr/share/fonts/truetype/%s", config.font.name.c_str()); #else - sprintf(_strName, "/usr/share/fonts/truetype/freefont/%s", config.font.name.c_str()); + sprintf(_strName, "/usr/share/fonts/truetype/freefont/%s", config.font.name.c_str()); +#endif +#ifdef MUPENPLUSAPI + if (!osal_path_existsA(_strName)) { + const char * fontPath = ConfigGetSharedDataFilepath("font.ttf"); + if (osal_path_existsA(fontPath)) + strncpy(_strName, fontPath, PLUGIN_PATH_SIZE); + } #endif return true; }