mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 18:15:10 +00:00
Made listing the default for modes test.
This commit is contained in:
parent
6ff3936101
commit
3d5a574e3b
@ -38,15 +38,13 @@ static GLFWwindow window = NULL;
|
|||||||
|
|
||||||
enum Mode
|
enum Mode
|
||||||
{
|
{
|
||||||
NO_MODE,
|
|
||||||
LIST_MODE,
|
LIST_MODE,
|
||||||
TEST_MODE
|
TEST_MODE
|
||||||
};
|
};
|
||||||
|
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
printf("Usage: modes -l\n");
|
printf("Usage: modes [-t]\n");
|
||||||
printf(" modes -t\n");
|
|
||||||
printf(" modes -h\n");
|
printf(" modes -h\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,19 +168,16 @@ static void test_modes(GLFWvidmode* modes, int count)
|
|||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
int ch, found, count = 0, mode = NO_MODE;
|
int ch, found, count = 0, mode = LIST_MODE;
|
||||||
GLFWvidmode* modes = NULL;
|
GLFWvidmode* modes = NULL;
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "lth")) != -1)
|
while ((ch = getopt(argc, argv, "th")) != -1)
|
||||||
{
|
{
|
||||||
switch (ch)
|
switch (ch)
|
||||||
{
|
{
|
||||||
case 'h':
|
case 'h':
|
||||||
usage();
|
usage();
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
case 'l':
|
|
||||||
mode = LIST_MODE;
|
|
||||||
break;
|
|
||||||
case 't':
|
case 't':
|
||||||
mode = TEST_MODE;
|
mode = TEST_MODE;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user