Commit 49bf0c57 authored by Sam Lantinga's avatar Sam Lantinga

You can't use memset() on screen formats with an alpha channel

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403282
parent bb3dd43b
...@@ -75,21 +75,6 @@ DrawPict(SDL_Surface * screen, char *bmpfile, ...@@ -75,21 +75,6 @@ DrawPict(SDL_Surface * screen, char *bmpfile,
" (colormap fading will suffer - try the -warp option)\n"); " (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 */ /* Display the picture */
if (speedy) { if (speedy) {
SDL_Surface *displayfmt; SDL_Surface *displayfmt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment