From b0f0700b1950abea583f958b8009366951067699 Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Fri, 3 Dec 2021 23:34:14 +0000 Subject: [PATCH] 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. --- src/Main/options.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Main/options.cxx b/src/Main/options.cxx index f5a395f61..b1b16d401 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -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() ) {