From: Côme Chilliet Date: Sat, 10 Dec 2016 18:18:17 +0000 (+0700) Subject: Reading debug mode from config again, but command line option overrides it X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=26200179711ba8a4faa41ae77b85a808d46255f4;p=lugaru.git Reading debug mode from config again, but command line option overrides it --- diff --git a/Source/Settings.cpp b/Source/Settings.cpp index 97cdbb2..fe6c37b 100644 --- a/Source/Settings.cpp +++ b/Source/Settings.cpp @@ -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) ) { diff --git a/Source/main.cpp b/Source/main.cpp index 2803226..10f2459 100644 --- a/Source/main.cpp +++ b/Source/main.cpp @@ -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;