1
0
Fork 0

Frederic Bouvier:

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.
This commit is contained in:
ehofman 2004-03-30 09:05:05 +00:00
parent 29d9c1b2f6
commit d430290e48
2 changed files with 13 additions and 5 deletions

View file

@ -1510,10 +1510,14 @@ bool fgMainInit( int argc, char **argv ) {
if ( !(base_version == required_version) ) { if ( !(base_version == required_version) ) {
// tell the operator how to use this application // 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: " \ << "Found version " << base_version << " at: " \
<< globals->get_fg_root() << endl; << globals->get_fg_root() );
cerr << "Please upgrade to version: " << required_version << endl; 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); exit(-1);
} }

View file

@ -1762,8 +1762,12 @@ void fgShowAircraft(const SGPath &path, bool recursive) {
fgSearchAircraft( path, aircraft, recursive ); fgSearchAircraft( path, aircraft, recursive );
sort(aircraft.begin(), aircraft.end()); 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++ ) { 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
} }