X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmisc.c;h=05dae3dd96449470e069b8de75acc4a7ba5743e4;hb=401f78b66d66488fe465945bef36b10faa6b55ef;hp=1cbb1c942813e9d3bff20bcf697fb67e37c98222;hpb=32c4954de6a800eef636c8167fb3469f6f3182c8;p=rocksndiamonds.git diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 1cbb1c94..05dae3dd 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -664,6 +664,7 @@ void GetOptions(char *argv[], void (*print_usage_function)(void)) options.network = FALSE; options.verbose = FALSE; options.debug = FALSE; + options.debug_x11_sync = FALSE; #if !defined(PLATFORM_UNIX) if (*options_left == NULL) /* no options given -- enable verbose mode */ @@ -789,6 +790,10 @@ void GetOptions(char *argv[], void (*print_usage_function)(void)) { options.debug = TRUE; } + else if (strncmp(option, "-debug-x11-sync", option_len) == 0) + { + options.debug_x11_sync = TRUE; + } else if (strncmp(option, "-execute", option_len) == 0) { if (option_arg == NULL) @@ -1595,6 +1600,24 @@ boolean get_boolean_from_string(char *s) return result; } +int get_switch3_from_string(char *s) +{ + char *s_lower = getStringToLower(s); + int result = FALSE; + + if (strEqual(s_lower, "true") || + strEqual(s_lower, "yes") || + strEqual(s_lower, "on") || + get_integer_from_string(s) == 1) + result = TRUE; + else if (strEqual(s_lower, "auto")) + result = AUTO; + + free(s_lower); + + return result; +} + /* ------------------------------------------------------------------------- */ /* functions for generic lists */