]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/options.cxx
A new comm radio and atis implementation
[flightgear.git] / src / Main / options.cxx
index 70477ad2c69a156df7fc2c8a2dcc04f145dbaab5..c1996bbef6ed22cf873393109a9b18173a562d7a 100644 (file)
@@ -185,7 +185,6 @@ void fgSetDefaults ()
     fgSetBool("/environment/clouds/status", true);
     fgSetBool("/sim/startup/fullscreen", false);
     fgSetBool("/sim/rendering/shading", true);
-    fgSetBool("/sim/rendering/textures", true);
     fgTie( "/sim/rendering/filtering", SGGetTextureFilter, SGSetTextureFilter, false);
     fgSetInt("/sim/rendering/filtering", 1);
     fgSetBool("/sim/rendering/wireframe", false);
@@ -1532,8 +1531,6 @@ struct OptionDesc {
     {"restore-defaults",             false, OPTION_BOOL,   "/sim/startup/restore-defaults", true, "", 0 },
     {"shading-flat",                 false, OPTION_BOOL,   "/sim/rendering/shading", false, "", 0 },
     {"shading-smooth",               false, OPTION_BOOL,   "/sim/rendering/shading", true, "", 0 },
-    {"disable-textures",             false, OPTION_BOOL,   "/sim/rendering/textures", false, "", 0 },
-    {"enable-textures",              false, OPTION_BOOL,   "/sim/rendering/textures", true, "", 0 },
     {"texture-filtering",            false, OPTION_INT,    "/sim/rendering/filtering", 1, "", 0 },
     {"disable-wireframe",            false, OPTION_BOOL,   "/sim/rendering/wireframe", false, "", 0 },
     {"enable-wireframe",             false, OPTION_BOOL,   "/sim/rendering/wireframe", true, "", 0 },
@@ -2419,6 +2416,22 @@ bool Options::shouldLoadDefaultConfig() const
 {
   return p->shouldLoadDefaultConfig;
 }
-  
+
+bool Options::checkForArg(int argc, char* argv[], const char* checkArg)
+{
+    for (int i = 0; i < argc; ++i) {
+        char* arg = argv[i];
+        if (!strncmp("--", arg, 2) && !strcmp(arg + 2, checkArg)) {
+            return true;
+        }
+        
+        if ((arg[0] == '-') && !strcmp(arg + 1, checkArg)) {
+            return true;
+        }
+    }
+    
+    return false;
+}
+    
 } // of namespace flightgear