]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scenery/FGTileLoader.cxx
Check for the plib version when using display lists, just to be sure.
[flightgear.git] / src / Scenery / FGTileLoader.cxx
index 2e0a01b2b860da2016717a9d4004341a66c3e5cb..255e76b85bb117ee7314999ebb235b406fa35476 100644 (file)
 extern ssgBranch *terrain;
 extern ssgBranch *ground;
 
+
 /**
  * 
  */
 FGTileLoader::FGTileLoader()
 {
-#ifdef ENABLE_THREADS
+#if defined(ENABLE_THREADS) && ENABLE_THREADS
     // Create and start the loader threads.
     for (int i = 0; i < MAX_THREADS; ++i)
     {
@@ -54,7 +55,7 @@ FGTileLoader::FGTileLoader()
  */
 FGTileLoader::~FGTileLoader()
 {
-#ifdef ENABLE_THREADS
+#if defined(ENABLE_THREADS) && ENABLE_THREADS
     // Wake up its time to die.
     // queue_cond.broadcast();
 
@@ -87,18 +88,12 @@ FGTileLoader::add( FGTileEntry* tile )
 {
     /**
      * Initialise tile_path here and not in ctor to avoid problems
-     * with the initialastion order of global objects.
+     * with the initialisation order of global objects.
      */
     static bool beenhere = false;
-    if (!beenhere)
-    {
-       if ( globals->get_fg_scenery() != (string)"" ) {
-           tile_path.set( globals->get_fg_scenery() );
-       } else {
-           tile_path.set( globals->get_fg_root() );
-           tile_path.append( "Scenery" );
-       }
-       beenhere = true;
+    if (!beenhere) {
+        tile_path = globals->get_fg_scenery();
+        beenhere = true;
     }
 
     tile_load_queue.push( tile );
@@ -122,7 +117,7 @@ void
 FGTileLoader::update()
 {
 
-#ifdef ENABLE_THREADS
+#if defined(ENABLE_THREADS) && ENABLE_THREADS
     // send a signal to the pager thread that it is allowed to load
     // another tile
     mutex.lock();
@@ -156,7 +151,7 @@ FGTileLoader::update()
 }
 
 
-#ifdef ENABLE_THREADS
+#if defined(ENABLE_THREADS) && ENABLE_THREADS
 /**
  * 
  */