add command-line options for antialias_level and compatibility_context

This commit is contained in:
Josh Holtrop 2012-09-06 21:49:14 -04:00
parent f5399ee5ac
commit b7e22a375d

View File

@ -1,17 +1,33 @@
#include <stdlib.h>
#include <getopt.h>
#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;