FGFontCache::initializeFonts() now portable across platform through the use of plib
This commit is contained in:
parent
bfc1967529
commit
7c8c8ff381
1 changed files with 5 additions and 5 deletions
|
@ -3,7 +3,7 @@
|
|||
#include <iostream>
|
||||
#include <cstring>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <plib/ul.h>
|
||||
|
||||
#include "new_gui.hxx"
|
||||
|
||||
|
@ -559,11 +559,11 @@ bool FGFontCache::initializeFonts()
|
|||
{
|
||||
static string fontext("txf");
|
||||
init();
|
||||
DIR* fontdir = opendir(_path.c_str());
|
||||
ulDir* fontdir = ulOpenDir(_path.c_str());
|
||||
if (!fontdir)
|
||||
return false;
|
||||
const dirent *dirEntry;
|
||||
while ((dirEntry = readdir(fontdir)) != 0) {
|
||||
const ulDirEnt *dirEntry;
|
||||
while ((dirEntry = ulReadDir(fontdir)) != 0) {
|
||||
SGPath path(_path);
|
||||
path.append(dirEntry->d_name);
|
||||
if (path.extension() == fontext) {
|
||||
|
@ -574,7 +574,7 @@ bool FGFontCache::initializeFonts()
|
|||
delete f;
|
||||
}
|
||||
}
|
||||
closedir(fontdir);
|
||||
ulCloseDir(fontdir);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue