Show the grey background first before starting to blit sprites
authorSam Lantinga <slouken@libsdl.org>
Thu, 27 Nov 2008 04:51:34 +0000
changeset 2792 c2d9b1aff59f
parent 2791 8133d1d278da
child 2793 b14f672b2857
Show the grey background first before starting to blit sprites
test/testsprite.c
--- a/test/testsprite.c	Wed Nov 26 21:59:35 2008 +0000
+++ b/test/testsprite.c	Thu Nov 27 04:51:34 2008 +0000
@@ -247,7 +247,11 @@
             velocities[i].y = (rand() % (MAX_SPEED * 2 + 1)) - MAX_SPEED;
         }
     }
+
+    /* Clear the background to grey */
     background = SDL_MapRGB(screen->format, 0xA0, 0xA0, 0xA0);
+    SDL_FillRect(screen, NULL, background);
+    SDL_Flip(screen);
 
     /* Print out information about our surfaces */
     printf("Screen is at %d bits per pixel\n", screen->format->BitsPerPixel);