Commit 7a4a7129 authored by Sam Lantinga's avatar Sam Lantinga

Fixed testalpha screen clear for screen formats with an alpha channel

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403267
parent b64cf822
......@@ -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;
......
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