]> git.jsancho.org Git - lugaru.git/commitdiff
Reading debug mode from config again, but command line option overrides it
authorCôme Chilliet <come@chilliet.eu>
Sat, 10 Dec 2016 18:18:17 +0000 (01:18 +0700)
committerCôme Chilliet <come@chilliet.eu>
Sat, 10 Dec 2016 18:18:17 +0000 (01:18 +0700)
Source/Settings.cpp
Source/main.cpp

index 97cdbb2d665b0f83665c3fd9158da7d950756271..fe6c37b13881a169684e3178fabd493fe574dd34 100644 (file)
@@ -52,6 +52,7 @@ void DefaultSettings()
     velocityblur = 0;
     volume = 0.8f;
     ambientsound = 1;
+    debugmode = 0;
 
     crouchkey = SDL_SCANCODE_LSHIFT;
     jumpkey = SDL_SCANCODE_SPACE;
@@ -241,6 +242,8 @@ bool LoadSettings()
             ipstream >> damageeffects;
         } else if ( !strncmp(setting, "Text", 4) ) {
             ipstream >> texttoggle;
+        } else if ( !strncmp(setting, "Debug", 5) ) {
+            ipstream >> debugmode;
         } else if ( !strncmp(setting, "Show Points", 11) ) {
             ipstream >> showpoints;
         } else if ( !strncmp(setting, "Always Blur", 11) ) {
index 2803226a0f4daeed83e077e173e835688562d2e0..10f2459eb4874ac1ff7c5b145bfa8ec999e2223e 100644 (file)
@@ -617,8 +617,6 @@ int main(int argc, char **argv)
         return 1;
     }
 
-    debugmode = commandLineOptions[DEBUG];
-
     // !!! FIXME: we could use a Win32 API for this.  --ryan.
 #ifndef WIN32
     chdirToAppPath(argv[0]);
@@ -637,6 +635,10 @@ int main(int argc, char **argv)
                 return 42;
             }
 
+            if (commandLineOptions[DEBUG]) {
+                debugmode = true;
+            }
+
             bool gameDone = false;
             bool gameFocused = true;