add command-line options for antialias_level and compatibility_context
This commit is contained in:
parent
f5399ee5ac
commit
b7e22a375d
@ -1,17 +1,33 @@
|
|||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include "Client.h"
|
#include "Client.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
bool fullscreen = false;
|
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 (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
int c = getopt_long(argc, argv, "f", NULL, NULL);
|
int c = getopt_long(argc, argv, "a:cf", longopts, NULL);
|
||||||
if (c == -1)
|
if (c == -1)
|
||||||
break;
|
break;
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
|
case 'a':
|
||||||
|
antialias_level = atoi(optarg);
|
||||||
|
break;
|
||||||
|
case 'c':
|
||||||
|
compatibility_context = true;
|
||||||
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
fullscreen = true;
|
fullscreen = true;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user