diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c index 9625adc8a..12c35f013 100644 --- a/src/video/SDL_pixels.c +++ b/src/video/SDL_pixels.c @@ -464,7 +464,6 @@ static Uint8 *Map1toN(SDL_Palette *src, SDL_PixelFormat *dst) Uint8 *map; int i; int bpp; - unsigned alpha; bpp = ((dst->BytesPerPixel == 3) ? 4 : dst->BytesPerPixel); map = (Uint8 *)malloc(src->ncolors*bpp); @@ -473,12 +472,11 @@ static Uint8 *Map1toN(SDL_Palette *src, SDL_PixelFormat *dst) return(NULL); } - alpha = dst->Amask ? SDL_ALPHA_OPAQUE : 0; /* We memory copy to the pixel map so the endianness is preserved */ for ( i=0; incolors; ++i ) { ASSEMBLE_RGBA(&map[i*bpp], dst->BytesPerPixel, dst, src->colors[i].r, src->colors[i].g, - src->colors[i].b, alpha); + src->colors[i].b, SDL_ALPHA_OPAQUE); } return(map); }