changeset 2792:c2d9b1aff59f

Show the grey background first before starting to blit sprites
author Sam Lantinga <slouken@libsdl.org>
date Thu, 27 Nov 2008 04:51:34 +0000
parents 8133d1d278da
children b14f672b2857
files test/testsprite.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);