]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_io.cxx
Set "/sim/fghome-readonly" to false also for Windows.
[flightgear.git] / src / Main / fg_io.cxx
index 4f27e276c574e7a93e0e721afa7e795d96665262..45d6a1e61ad926dd62939817636c2a53d8caae8f 100644 (file)
@@ -49,6 +49,7 @@
 #include <Network/AV400WSim.hxx>
 #include <Network/garmin.hxx>
 #include <Network/httpd.hxx>
+#include <Network/igc.hxx>
 #ifdef FG_JPEG_SERVER
 #  include <Network/jpg-httpd.hxx>
 #endif
@@ -65,9 +66,8 @@
 #include <Network/ray.hxx>
 #include <Network/rul.hxx>
 #include <Network/generic.hxx>
-#include <Network/HTTPClient.hxx>
 
-#ifdef FG_HAVE_HLA
+#if FG_HAVE_HLA
 #include <Network/HLA/hla.hxx>
 #endif
 
@@ -148,6 +148,9 @@ FGIO::parse_port_config( const string& config )
         } else if ( protocol == "garmin" ) {
             FGGarmin *garmin = new FGGarmin;
             io = garmin;
+        } else if ( protocol == "igc" ) {
+            IGCProtocol *igc = new IGCProtocol;
+            io = igc;
         } else if ( protocol == "httpd" ) {
             // determine port
             string port = tokens[1];
@@ -225,9 +228,23 @@ FGIO::parse_port_config( const string& config )
 
             return NULL;
         }
-#ifdef FG_HAVE_HLA
+#if FG_HAVE_HLA
         else if ( protocol == "hla" ) {
             return new FGHLA(tokens);
+        }
+        else if ( protocol == "hla-local" ) {
+            // This is just about to bring up some defaults
+            if (tokens.size() != 2) {
+                SG_LOG( SG_IO, SG_ALERT, "Ignoring invalid --hla-local option "
+                        "(one argument expected: --hla-local=<federationname>" );
+                return NULL;
+            }
+            tokens.insert(tokens.begin(), "");
+            tokens.insert(tokens.begin(), "60");
+            tokens.insert(tokens.begin(), "bi");
+            tokens.push_back("fg-local.xml");
+            return new FGHLA(tokens);
+        }
 #endif
         else {
             return NULL;
@@ -381,10 +398,6 @@ FGIO::reinit()
 void
 FGIO::update( double /* delta_time_sec */ )
 {
-    if (FGHTTPClient::haveInstance()) {
-        FGHTTPClient::instance()->update();
-    }
-    
     // use wall-clock, not simulation, delta time, so that network
     // protocols update when the simulation is paused
     // see http://code.google.com/p/flightgear-bugs/issues/detail?id=125