change fsaa argument for testgl to accept a # of samples for FSAA
authorEdward Rudd <urkle@outoforder.cc>
Mon, 08 Jul 2013 17:51:17 -0400
changeset 7381 aa0d6c66e3fa
parent 7380 e5830832d3f0
child 7382 898992405fa7
change fsaa argument for testgl to accept a # of samples for FSAA
test/testgl2.c
--- a/test/testgl2.c	Mon Jul 08 13:26:59 2013 -0400
+++ b/test/testgl2.c	Mon Jul 08 17:51:17 2013 -0400
@@ -195,9 +195,9 @@
 
         consumed = SDLTest_CommonArg(state, i);
         if (consumed == 0) {
-            if (SDL_strcasecmp(argv[i], "--fsaa") == 0) {
-                ++fsaa;
-                consumed = 1;
+            if (SDL_strcasecmp(argv[i], "--fsaa") == 0 && i+1 < argc) {
+                fsaa = atoi(argv[i+1]);
+                consumed = 2;
             } else if (SDL_strcasecmp(argv[i], "--accel") == 0 && i+1 < argc) {
                 accel = atoi(argv[i+1]);
                 consumed = 2;
@@ -206,7 +206,7 @@
             }
         }
         if (consumed < 0) {
-            fprintf(stderr, "Usage: %s %s [--fsaa] [--accel n]\n", argv[0],
+            fprintf(stderr, "Usage: %s %s [--fsaa n] [--accel n]\n", argv[0],
                     SDLTest_CommonUsage(state));
             quit(1);
         }