summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--progs/xdemos/glxgears.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/progs/xdemos/glxgears.c b/progs/xdemos/glxgears.c
index 00b05dc980..304fd4befa 100644
--- a/progs/xdemos/glxgears.c
+++ b/progs/xdemos/glxgears.c
@@ -540,6 +540,17 @@ event_loop(Display *dpy, Window win)
}
+static void
+usage(void)
+{
+ printf("Usage:\n");
+ printf(" -display <displayname> set the display to run on\n");
+ printf(" -stereo run in stereo mode\n");
+ printf(" -fullscreen run in fullscreen mode\n");
+ printf(" -info display OpenGL renderer info\n");
+}
+
+
int
main(int argc, char *argv[])
{
@@ -564,8 +575,10 @@ main(int argc, char *argv[])
else if (strcmp(argv[i], "-fullscreen") == 0) {
fullscreen = GL_TRUE;
}
- else
- printf("Warrning: unknown parameter: %s\n", argv[i]);
+ else {
+ usage();
+ return -1;
+ }
}
dpy = XOpenDisplay(dpyName);