From: Mathnerd314 Date: Thu, 3 Sep 2009 19:49:52 +0000 (+0000) Subject: Option --renderer to select video renderer X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=051da28245f26cb1a073c764de235460e87ec64f;p=supertux.git Option --renderer to select video renderer SVN-Revision: 5913 --- diff --git a/man/man6/supertux2.6 b/man/man6/supertux2.6 index 7282a0a9b..31d913c8e 100644 --- a/man/man6/supertux2.6 +++ b/man/man6/supertux2.6 @@ -36,6 +36,9 @@ Run SuperTux with given aspect ratio (eg. \-a 4:3) .B \-d, \-\-default Reset video settings to default values (\-g 800x600 \-a auto \-w) .TP +.B \-\-renderer RENDERER +Render the game using the specified video renderer. Valid values are sdl, opengl, and auto (the default). +.TP .B \-\-disable\-sfx Disable sound effects .TP diff --git a/src/main.cpp b/src/main.cpp index 2400ed0a2..47a40f4c3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -224,6 +224,7 @@ static void print_usage(const char* argv0) " -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" + " --renderer RENDERER Use sdl, opengl, or auto to render\n" " --disable-sfx Disable sound effects\n" " --disable-music Disable music\n" " -h, --help Show this help message and quit\n" @@ -343,6 +344,17 @@ static bool parse_commandline(int argc, char** argv) } } } + } else if(arg == "--renderer") { + i += 1; + if(i >= argc) + { + print_usage(argv[0]); + throw std::runtime_error("Need to specify a renderer for renderer argument"); + } + else + { + config->video = get_video_system(argv[i]); + } } else if(arg == "--show-fps") { config->show_fps = true; } else if(arg == "--no-show-fps") {