From 3f66e88289f4e3399129049e9f3eb61651e0ce2d Mon Sep 17 00:00:00 2001 From: WALL OF JUSTICE <-> Date: Tue, 15 Aug 2023 08:06:31 +1000 Subject: [PATCH] * fonts folder is moddable --- src/ui/Font.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ui/Font.cpp b/src/ui/Font.cpp index 20168225a..8367f9fbf 100644 --- a/src/ui/Font.cpp +++ b/src/ui/Font.cpp @@ -23,6 +23,13 @@ Font::Font(const char* _name) { } #ifdef NINTENDO path = "rom:/" + path; +#else + if ( PHYSFS_getRealDir(path.c_str()) ) + { + std::string realPath = PHYSFS_getRealDir(path.c_str()); + path.insert(0, PHYSFS_getDirSeparator()); + path.insert(0, realPath); + } #endif if ((font = TTF_OpenFont(path.c_str(), pointSize)) == NULL) { printlog("failed to load '%s': %s", path.c_str(), TTF_GetError());