Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
You can't use memset() on screen formats with an alpha channel
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 2, 2008
1 parent 8bf06a1 commit d885b12
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions test/testwin.c
Expand Up @@ -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;
Expand Down

0 comments on commit d885b12

Please sign in to comment.