Fixed testalpha screen clear for screen formats with an alpha channel

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403267
This commit is contained in:
Sam Lantinga 2008-11-29 11:24:18 +00:00
parent b64cf8229c
commit 7a4a712978

View file

@ -65,8 +65,7 @@ FillBackground(SDL_Surface * screen)
Uint32 color;
gradient = ((i * 255) / screen->h);
color = SDL_MapRGB(screen->format,
gradient, gradient, gradient);
color = SDL_MapRGB(screen->format, gradient, gradient, gradient);
buffer32 = (Uint32 *) buffer;
for (k = 0; k < screen->w; k++) {
*buffer32++ = color;
@ -523,7 +522,8 @@ main(int argc, char *argv[])
area.y = event.button.y - 16;
area.w = 32;
area.h = 32;
SDL_FillRect(screen, &area, SDL_MapRGB(screen->format, 0, 0, 0));
SDL_FillRect(screen, &area,
SDL_MapRGB(screen->format, 0, 0, 0));
SDL_UpdateRects(screen, 1, &area);
}
break;