src/Main/options.cxx: allow bool options to be disabled if set to 0 or false.
E.g. --disable-splash-screen=0 will not disable the splash screen.
This commit is contained in:
parent
77c362a9d4
commit
b0f0700b19
1 changed files with 6 additions and 1 deletions
|
@ -2085,7 +2085,12 @@ public:
|
|||
|
||||
switch ( desc->type & 0xffff ) {
|
||||
case OPTION_BOOL:
|
||||
fgSetBool( desc->property, desc->b_param );
|
||||
if (arg_value == "0" || arg_value == "false") {
|
||||
SG_LOG( SG_GENERAL, SG_ALERT, "Ignoring bool option '" << desc->option << "' because value is " << arg_value);
|
||||
}
|
||||
else {
|
||||
fgSetBool( desc->property, desc->b_param );
|
||||
}
|
||||
break;
|
||||
case OPTION_STRING:
|
||||
if ( desc->has_param && !arg_value.empty() ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue