From b7e22a375d9c561fe8b9990ed8f24f8af0ccec4b Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 6 Sep 2012 21:49:14 -0400 Subject: [PATCH] add command-line options for antialias_level and compatibility_context --- src/client/main.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/client/main.cc b/src/client/main.cc index e565249..63ad9fc 100755 --- a/src/client/main.cc +++ b/src/client/main.cc @@ -1,17 +1,33 @@ +#include #include #include "Client.h" int main(int argc, char *argv[]) { bool fullscreen = false; + unsigned int antialias_level = 0u; + bool compatibility_context = false; + + struct option longopts[] = { + {"antialias-level", required_argument, NULL, 'a'}, + {"compatibility", no_argument, NULL, 'c'}, + {"fullscreen", no_argument, NULL, 'f'}, + {NULL, 0, NULL, 0} + }; for (;;) { - int c = getopt_long(argc, argv, "f", NULL, NULL); + int c = getopt_long(argc, argv, "a:cf", longopts, NULL); if (c == -1) break; switch (c) { + case 'a': + antialias_level = atoi(optarg); + break; + case 'c': + compatibility_context = true; + break; case 'f': fullscreen = true; break;