X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FScenery%2FFGTileLoader.cxx;h=3bbe26521f994e9a27932f5885287540ff890c84;hb=56592f3869c41e4f189e9ab44abb1a0898c90f4b;hp=69338c03b88d42df4b3ef2639f33f5769dcb2051;hpb=d5a2533411722827d98e6103d383ae4c28f7350b;p=flightgear.git diff --git a/src/Scenery/FGTileLoader.cxx b/src/Scenery/FGTileLoader.cxx index 69338c03b..3bbe26521 100644 --- a/src/Scenery/FGTileLoader.cxx +++ b/src/Scenery/FGTileLoader.cxx @@ -24,6 +24,8 @@ # include #endif +#include + #include
#include "FGTileLoader.hxx" #include "tileentry.hxx" @@ -90,7 +92,7 @@ FGTileLoader::add( FGTileEntry* tile ) static bool beenhere = false; if (!beenhere) { - if ( globals->get_fg_scenery() != (string)"" ) { + if ( !globals->get_fg_scenery().empty() ) { tile_path.set( globals->get_fg_scenery() ); } else { tile_path.set( globals->get_fg_root() ); @@ -119,6 +121,7 @@ FGTileLoader::remove( FGTileEntry* tile ) void FGTileLoader::update() { + #ifdef ENABLE_THREADS // send a signal to the pager thread that it is allowed to load // another tile @@ -131,7 +134,9 @@ FGTileLoader::update() // load the next tile in the queue FGTileEntry* tile = tile_load_queue.front(); tile_load_queue.pop(); + tile->load( tile_path, true ); + FGTileMgr::ready_to_attach( tile ); } @@ -147,6 +152,7 @@ FGTileLoader::update() #endif #endif // ENABLE_THREADS + }