]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/new_gui.cxx
Added two missing files from JSBSim.org that were missing in the last sync.
[flightgear.git] / src / GUI / new_gui.cxx
index c6057b771dc7e18ff0bed62ed888d7902a402c21..ff9c7ad3c337c370a9ed1d79f66e50589fb83778 100644 (file)
@@ -3,7 +3,7 @@
 #include <iostream>
 #include <cstring>
 #include <sys/types.h>
-#include <dirent.h>
+#include <plib/ul.h>
 
 #include "new_gui.hxx"
 
@@ -12,6 +12,7 @@
 
 #include <simgear/compiler.h>
 #include <simgear/structure/exception.hxx>
+#include <simgear/props/props_io.hxx>
 
 #include <Main/fg_props.hxx>
 
@@ -559,11 +560,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 +575,7 @@ bool FGFontCache::initializeFonts()
                 delete f;
         }
     }
-    closedir(fontdir);
+    ulCloseDir(fontdir);
     return true;
 }