From 75bc7c4024af3aba122923f2341d0b29f67c7a6d Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 11 Feb 2023 12:32:57 +0100 Subject: [PATCH] added setup file options for debug mode --- src/files.c | 10 ++++++++++ src/init.c | 6 ++++++ 2 files changed, 16 insertions(+) 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; } -- 2.34.1