From d885b123060f491d5c49365f1191ec1b03358e82 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 2 Dec 2008 16:09:58 +0000 Subject: [PATCH] You can't use memset() on screen formats with an alpha channel --- test/testwin.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/test/testwin.c b/test/testwin.c index 8b4c9e6a4..c93982161 100644 --- a/test/testwin.c +++ b/test/testwin.c @@ -75,21 +75,6 @@ DrawPict(SDL_Surface * screen, char *bmpfile, " (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;