From 47800234c11dc4894fb0e233878277a3e413e88a Mon Sep 17 00:00:00 2001 From: Wolfgang Becker Date: Tue, 29 Apr 2008 21:05:57 +0000 Subject: [PATCH] Command line switch -d, --default to reset video settings to default values. SVN-Revision: 5391 --- man/man6/supertux2.6 | 3 +++ src/gameconfig.cpp | 2 +- src/main.cpp | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/man/man6/supertux2.6 b/man/man6/supertux2.6 index c912c4b1b..7282a0a9b 100644 --- a/man/man6/supertux2.6 +++ b/man/man6/supertux2.6 @@ -33,6 +33,9 @@ Run SuperTux in given resolution (eg. \-g 800x600) .B \-a, \-\-aspect WIDTH:HEIGHT Run SuperTux with given aspect ratio (eg. \-a 4:3) .TP +.B \-d, \-\-default +Reset video settings to default values (\-g 800x600 \-a auto \-w) +.TP .B \-\-disable\-sfx Disable sound effects .TP diff --git a/src/gameconfig.cpp b/src/gameconfig.cpp index 060eed074..2b8929ec6 100644 --- a/src/gameconfig.cpp +++ b/src/gameconfig.cpp @@ -35,7 +35,7 @@ Config* config = 0; Config::Config() { - use_fullscreen = true; + use_fullscreen = false; video = AUTO_VIDEO; try_vsync = true; show_fps = false; diff --git a/src/main.cpp b/src/main.cpp index 08d3d86fe..20ea6131a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -243,6 +243,7 @@ static void print_usage(const char* argv0) " -w, --window Run in window mode\n" " -g, --geometry WIDTHxHEIGHT Run SuperTux in given resolution\n" " -a, --aspect WIDTH:HEIGHT Run SuperTux with given aspect ratio\n" + " -d, --default Reset video settings to default values\n" " --disable-sfx Disable sound effects\n" " --disable-music Disable music\n" " --help Show this help message\n" @@ -286,6 +287,11 @@ static bool parse_commandline(int argc, char** argv) return true; } else if(arg == "--fullscreen" || arg == "-f") { config->use_fullscreen = true; + } else if(arg == "--default" || arg == "-d") { + config->use_fullscreen = false; + config->aspect_ratio = -1; + config->screenwidth = 800; + config->screenheight = 600; } else if(arg == "--window" || arg == "-w") { config->use_fullscreen = false; } else if(arg == "--geometry" || arg == "-g") { -- 2.11.0