mirror of
https://github.com/lov3b/Pong.git
synced 2025-12-14 16:40:06 +01:00
lookup linux font on runtime
This commit is contained in:
@@ -41,6 +41,7 @@ public:
|
||||
*/
|
||||
TextScreen(const std::string &text, SDL_Point *screenSize, std::optional<SDL_Point> basePosition) : hasUpdated(
|
||||
false), screenSize(screenSize), basePosition(basePosition) {
|
||||
const char *defaultFontPath = getDefaultFontPath();
|
||||
if (defaultFontPath == nullptr) {
|
||||
std::cerr << "Font path is not set for this platform (null)" << std::endl;
|
||||
exit(-1);
|
||||
|
||||
Reference in New Issue
Block a user