diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-14 16:31:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-14 16:36:05 +0300 |
commit | 51a88d35e9b5e473eae80916a894ee95dc0e05d8 (patch) | |
tree | de206d344459c96cc5bc8ca3c9a863299922c63b /src/main.cpp | |
parent | 75402569f455321e5fd078a57c35b2032a3bdbaf (diff) | |
download | manaverse-51a88d35e9b5e473eae80916a894ee95dc0e05d8.tar.gz manaverse-51a88d35e9b5e473eae80916a894ee95dc0e05d8.tar.bz2 manaverse-51a88d35e9b5e473eae80916a894ee95dc0e05d8.tar.xz manaverse-51a88d35e9b5e473eae80916a894ee95dc0e05d8.zip |
Add --renderer command flag to override renderer
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 23ad034fc..7fc00918f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -127,6 +127,8 @@ static void printHelp() // TRANSLATORS: command line help << _(" --safemode : Start game in safe mode") << std::endl // TRANSLATORS: command line help + << _(" --renderer : Set renderer type") << std::endl + // TRANSLATORS: command line help << _(" -T --tests : Start testing drivers and " "auto configuring") << std::endl #ifdef USE_OPENGL @@ -144,7 +146,7 @@ static void printVersion() static void parseOptions(const int argc, char *const argv[]) { - const char *const optstring = "hvud:U:P:Dc:p:l:L:C:s:t:T:a"; + const char *const optstring = "hvud:U:P:Dc:p:l:L:C:s:t:T:a:r"; const struct option long_options[] = { @@ -168,6 +170,7 @@ static void parseOptions(const int argc, char *const argv[]) { "safemode", no_argument, nullptr, 'm' }, { "tests", no_argument, nullptr, 'T' }, { "test", required_argument, nullptr, 't' }, + { "renderer", required_argument, nullptr, 'r' }, { nullptr, 0, nullptr, 0 } }; @@ -250,6 +253,9 @@ static void parseOptions(const int argc, char *const argv[]) options.testMode = true; options.test = std::string(optarg); break; + case 'r': + options.renderer = static_cast<int>(atoi(optarg)); + break; default: break; } |