X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fmain.cpp;h=47a40f4c3cfa07c1450ae609caa954946031a0c8;hb=788a9153f60fb3d25a52fd184387ebbde7636719;hp=2400ed0a22624fd93194a59c9e7c1f12d270a7c4;hpb=058e2f6298d8319c0fe03c5e950a36a8f1f57aba;p=supertux.git 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") {