added setup file options for debug mode
authorHolger Schemel <info@artsoft.org>
Sat, 11 Feb 2023 11:32:57 +0000 (12:32 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 11 Feb 2023 11:32:57 +0000 (12:32 +0100)
src/files.c
src/init.c

index ef38d17026b1277b953e48e0a19997601f148c50..5439ca15d7e9cbf711c4e3a812ac3c19e60662d1 100644 (file)
@@ -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;
index 6cfba4e633c944145fee8330797e0ef72c32a839..8bc67e849c2a93ab809054a02e8083d3ccbbb654 100644 (file)
@@ -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;
 }