# include <config.h>
#endif
+#include <simgear/compiler.h>
+
#include <Main/globals.hxx>
#include "FGTileLoader.hxx"
#include "tileentry.hxx"
static bool beenhere = false;
if (!beenhere)
{
- if ( globals->get_fg_scenery() != (string)"" ) {
- tile_path.set( globals->get_fg_scenery() );
+ if ( !globals->get_fg_scenery().empty() ) {
+ tile_path = globals->get_fg_scenery();
} else {
- tile_path.set( globals->get_fg_root() );
- tile_path.append( "Scenery" );
+ SGPath tmp;
+ tmp.set( globals->get_fg_root() );
+ tmp.append( "Scenery" );
+ tile_path = tmp.str();
}
beenhere = true;
}
void
FGTileLoader::update()
{
+
#ifdef ENABLE_THREADS
// send a signal to the pager thread that it is allowed to load
// another tile
// 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 );
}
#endif
#endif // ENABLE_THREADS
+
}