From: Holger Schemel Date: Sat, 11 Feb 2023 11:32:57 +0000 (+0100) Subject: added setup file options for debug mode X-Git-Tag: 4.3.5.0~3 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=75bc7c4024af3aba122923f2341d0b29f67c7a6d;p=rocksndiamonds.git added setup file options for debug mode --- diff --git a/src/files.c b/src/files.c index ef38d170..5439ca15 100644 --- a/src/files.c +++ b/src/files.c @@ -10371,6 +10371,14 @@ static struct TokenInfo options_setup_tokens[] = TYPE_BOOLEAN, &setup.options.verbose, "options.verbose" }, + { + TYPE_BOOLEAN, + &setup.options.debug, "options.debug" + }, + { + TYPE_STRING, + &setup.options.debug_mode, "options.debug_mode" + }, }; static void setSetupInfoToDefaults(struct SetupInfo *si) @@ -10642,6 +10650,8 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->debug.xsn_percent = 0; si->options.verbose = FALSE; + si->options.debug = FALSE; + si->options.debug_mode = getStringCopy(ARG_UNDEFINED_STRING); #if defined(PLATFORM_ANDROID) si->fullscreen = TRUE; diff --git a/src/init.c b/src/init.c index 6cfba4e6..8bc67e84 100644 --- a/src/init.c +++ b/src/init.c @@ -5471,6 +5471,12 @@ static void InitSetup(void) if (setup.options.verbose) options.verbose = TRUE; + if (setup.options.debug) + options.debug = TRUE; + + if (!strEqual(setup.options.debug_mode, ARG_UNDEFINED_STRING)) + options.debug_mode = getStringCopy(setup.options.debug_mode); + if (setup.debug.show_frames_per_second) global.show_frames_per_second = TRUE; }