]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/options.cxx
Merge branch 'curt/replay' into next
[flightgear.git] / src / Main / options.cxx
index ceca89101118ad9d04c3ec6614bb9c705967776c..bededfb71e43ed8cbbfe535954bb60a1f5d57440 100644 (file)
@@ -62,6 +62,7 @@
 #include "util.hxx"
 #include "viewmgr.hxx"
 #include <Main/viewer.hxx>
+#include <simgear/version.h>
 
 using std::string;
 using std::sort;
@@ -204,7 +205,7 @@ fgSetDefaults ()
     fgSetBool("/sim/rendering/shading", true);
     fgSetBool("/sim/rendering/skyblend", true);
     fgSetBool("/sim/rendering/textures", true);
-       fgTie( "/sim/rendering/filtering", SGGetTextureFilter, SGSetTextureFilter, false);
+    fgTie( "/sim/rendering/filtering", SGGetTextureFilter, SGSetTextureFilter, false);
     fgSetInt("/sim/rendering/filtering", 1);
     fgSetBool("/sim/rendering/wireframe", false);
     fgSetBool("/sim/rendering/horizon-effect", false);
@@ -1197,9 +1198,22 @@ fgOptParking( const char *arg )
 static int
 fgOptVersion( const char *arg )
 {
-    cerr << VERSION << endl;
+    cerr << "FlightGear version: " << VERSION << endl;
     cerr << "FG_ROOT=" << globals->get_fg_root() << endl;
     cerr << "FG_HOME=" << fgGetString("/sim/fg-home") << endl;
+    cerr << "FG_SCENERY=";
+
+    int didsome = 0;
+    string_list scn = globals->get_fg_scenery();
+    for (string_list::const_iterator it = scn.begin(); it != scn.end(); it++)
+    {
+        if (didsome) cerr << ":";
+        didsome++;
+        cerr << *it;
+    }
+    cerr << endl;
+    cerr << "SimGear version: " << SG_STRINGIZE(SIMGEAR_VERSION) << endl;
+    cerr << "PLIB version: " << PLIB_VERSION << endl;
     return FG_OPTIONS_EXIT;
 }
 
@@ -1630,9 +1644,16 @@ fgParseArgs (int argc, char **argv)
 
             } else if (result == FG_OPTIONS_SHOW_SOUND_DEVICES) {
               SGSoundMgr smgr;
+
+              smgr.init();
+              string vendor = smgr.get_vendor();
+              string renderer = smgr.get_renderer();
+              cout << renderer << " provided by " << vendor << endl;
+              cout << endl << "No. Device" << endl;
+
               vector <const char*>devices = smgr.get_available_devices();
               for (int i=0; i<devices.size(); i++) {
-                printf("%i. \"%s\"\n", i, devices[i]);
+                cout << i << ".  \"" << devices[i] << "\"" << endl;
               }
               devices.clear();
               exit(0);