]> git.mxchange.org Git - flightgear.git/commitdiff
Frederic Bouvier:
authorehofman <ehofman>
Tue, 30 Mar 2004 09:05:05 +0000 (09:05 +0000)
committerehofman <ehofman>
Tue, 30 Mar 2004 09:05:05 +0000 (09:05 +0000)
trying the --show-aircraft option, I noticed that I had
no output. This is because there are still output to
cout or cerr, that are not triggering my console patch
for windows. The patch attached use SG_LOG instead.
A request to hit a key is also added because otherwise,
the console window will disappear as soon as the program
stop.

This problem is minor though given the fact that fgfs.exe
is shipped with fgrun that do show the available aircraft
in a much nicer manner.

src/Main/main.cxx
src/Main/options.cxx

index 8636e3b9d54af769e5f7ec62490edbc5ec705c6b..e97a4cff5d0b57a1038b80553ae792309b03a3b2 100644 (file)
@@ -1510,10 +1510,14 @@ bool fgMainInit( int argc, char **argv ) {
     if ( !(base_version == required_version) ) {
         // tell the operator how to use this application
 
-        cerr << endl << "Base package check failed ... " \
+        SG_LOG( SG_GENERAL, SG_ALERT, endl << "Base package check failed ... " \
              << "Found version " << base_version << " at: " \
-             << globals->get_fg_root() << endl;
-        cerr << "Please upgrade to version: " << required_version << endl;
+             << globals->get_fg_root() );
+        SG_LOG( SG_GENERAL, SG_ALERT, "Please upgrade to version: " << required_version );
+#ifdef _MSC_VER
+        SG_LOG( SG_GENERAL, SG_ALERT, "Hit a key to continue..." );
+        cin.get();
+#endif
         exit(-1);
     }
 
index df0513a4916f52f763ba76d4e8183956369e4cf0..206b2a308d152b7791cff806701b43f01b8c78de 100644 (file)
@@ -1762,8 +1762,12 @@ void fgShowAircraft(const SGPath &path, bool recursive) {
     fgSearchAircraft( path, aircraft, recursive );
 
     sort(aircraft.begin(), aircraft.end());
-    cout << "Available aircraft:" << endl;
+    SG_LOG( SG_GENERAL, SG_ALERT, "Available aircraft:" );
     for ( unsigned int i = 0; i < aircraft.size(); i++ ) {
-        cout << aircraft[i] << endl;
+        SG_LOG( SG_GENERAL, SG_ALERT, aircraft[i] );
     }
+#ifdef _MSC_VER
+    SG_LOG( SG_GENERAL, SG_ALERT, "Hit a key to continue..." );
+    cin.get();
+#endif
 }