test/testdraw2.c
changeset 7639 9406b7dd2f2d
parent 7517 965d57022c01
child 7787 e6f3e8fc96ea
--- a/test/testdraw2.c	Mon Aug 12 22:00:21 2013 -0700
+++ b/test/testdraw2.c	Wed Aug 14 23:30:10 2013 -0700
@@ -176,6 +176,9 @@
     SDL_Event event;
     Uint32 then, now, frames;
 
+	/* Enable standard application logging */
+	SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
+
     /* Initialize parameters */
     num_objects = NUM_OBJECTS;
 
@@ -218,8 +221,7 @@
             }
         }
         if (consumed < 0) {
-            fprintf(stderr,
-                    "Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n",
+            SDL_Log("Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n",
                     argv[0], SDLTest_CommonUsage(state));
             return 1;
         }
@@ -268,7 +270,7 @@
     now = SDL_GetTicks();
     if (now > then) {
         double fps = ((double) frames * 1000) / (now - then);
-        printf("%2.2f frames per second\n", fps);
+        SDL_Log("%2.2f frames per second\n", fps);
     }
     return 0;
 }