X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Ffg_init.cxx;h=bddcc69f1d00c2c3f8410336a057d577a1a9e5f2;hb=b587400846111cc4d6713dcdd38b715c97923d5a;hp=3a8a078c16589737b9e7e96189583cee25312341;hpb=d8ae90801acd1ea051d2f46dc434b649ea53ba2f;p=flightgear.git diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 3a8a078c1..bddcc69f1 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -32,12 +32,12 @@ #if defined( unix ) || defined( __CYGWIN__ ) # include // for gethostname() #endif -#if defined( _MSC_VER) || defined(__MINGW32__) +#ifdef _WIN32 # include // for getcwd() # define getcwd _getcwd # include // isatty() # define isatty _isatty -# include "Winsock2.h" // for gethostname() +# include "winsock2.h" // for gethostname() #endif // work around a stdc++ lib bug in some versions of linux, but doesn't @@ -277,9 +277,9 @@ bool fgInitFGRoot ( int argc, char **argv ) { // find fg-root any other way. if ( root.empty() ) { #if defined( __CYGWIN__ ) - root = "/FlightGear"; -#elif defined( WIN32 ) - root = "\\FlightGear"; + root = "../data"; +#elif defined( _WIN32 ) + root = "..\\data"; #elif defined(__APPLE__) /* The following code looks for the base package inside the application @@ -593,7 +593,7 @@ bool fgInitConfig ( int argc, char **argv ) { } SGPropertyNode autosave; -#if defined( _MSC_VER ) || defined( __MINGW32__ ) +#ifdef _WIN32 char *envp = ::getenv( "APPDATA" ); if (envp != NULL ) { SGPath config( envp ); @@ -810,6 +810,7 @@ static bool fgSetPosFromAirportIDandParkpos( const string& id, const string& par return false; } FGParking* parking = dcs->getParking(park_index); + parking->setAvailable(false); fgApplyStartOffset( SGGeod::fromDeg(parking->getLongitude(), parking->getLatitude()), parking->getHeading()); @@ -1466,21 +1467,6 @@ bool fgInitSubsystems() { globals->get_event_mgr()->init(); globals->get_event_mgr()->setRealtimeProperty(fgGetNode("/sim/time/delta-realtime-sec", true)); - //////////////////////////////////////////////////////////////////// - // Initialize the sound manager subsystem. - //////////////////////////////////////////////////////////////////// - - globals->get_soundmgr()->bind(); - globals->get_soundmgr()->init(fgGetString("/sim/sound/device-name", NULL)); - - vector devices = - globals->get_soundmgr()->get_available_devices(); - for (unsigned int i=0; isetStringValue(devices[i]); - } - devices.clear(); - //////////////////////////////////////////////////////////////////// // Initialize the property interpolator subsystem. Put into the INIT // group because the "nasal" subsystem may need it at GENERAL take-down. @@ -1561,7 +1547,7 @@ bool fgInitSubsystems() { // Initialize the XML Autopilot subsystem. //////////////////////////////////////////////////////////////////// - globals->add_subsystem( "xml-autopilot", new FGXMLAutopilot ); + globals->add_subsystem( "xml-autopilot", new FGXMLAutopilotGroup ); globals->add_subsystem( "route-manager", new FGRouteMgr ); globals->add_subsystem( "autobrake", new FGAutoBrake );