changeset 2821:c4eccbd21d16

You can't use memset() on screen formats with an alpha channel
author Sam Lantinga <slouken@libsdl.org>
date Tue, 02 Dec 2008 16:09:58 +0000
parents 33ddad305f3d
children cf271ff76061
files test/testwin.c
diffstat 1 files changed, 0 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/test/testwin.c	Mon Dec 01 23:09:09 2008 +0000
+++ b/test/testwin.c	Tue Dec 02 16:09:58 2008 +0000
@@ -75,21 +75,6 @@
                 "         (colormap fading will suffer - try the -warp option)\n");
     }
 
-    /* Set the screen to black (not really necessary) */
-    if (SDL_LockSurface(screen) == 0) {
-        Uint32 black;
-        Uint8 *pixels;
-
-        black = SDL_MapRGB(screen->format, 0, 0, 0);
-        pixels = (Uint8 *) screen->pixels;
-        for (i = 0; i < screen->h; ++i) {
-            memset(pixels, black, screen->w * screen->format->BytesPerPixel);
-            pixels += screen->pitch;
-        }
-        SDL_UnlockSurface(screen);
-        SDL_UpdateRect(screen, 0, 0, 0, 0);
-    }
-
     /* Display the picture */
     if (speedy) {
         SDL_Surface *displayfmt;