Fixed building on Linux
authorSam Lantinga <slouken@libsdl.org>
Sun, 22 Jan 2012 23:46:29 -0500
changeset 32292e073f230d0
parent 321 fd488b9e71e0
child 323 5fa92cf4e813
Fixed building on Linux
IMG_gif.c
IMG_jpg.c
IMG_png.c
IMG_tga.c
     1.1 --- a/IMG_gif.c	Sun Jan 22 23:20:50 2012 -0500
     1.2 +++ b/IMG_gif.c	Sun Jan 22 23:46:29 2012 -0500
     1.3 @@ -261,7 +261,7 @@
     1.4  
     1.5  #ifdef USED_BY_SDL
     1.6      if ( Gif89.transparent >= 0 ) {
     1.7 -        SDL_SetColorKey(image, SDL_SRCCOLORKEY, Gif89.transparent);
     1.8 +        SDL_SetColorKey(image, SDL_TRUE, Gif89.transparent);
     1.9      }
    1.10  #endif
    1.11  
     2.1 --- a/IMG_jpg.c	Sun Jan 22 23:20:50 2012 -0500
     2.2 +++ b/IMG_jpg.c	Sun Jan 22 23:46:29 2012 -0500
     2.3 @@ -436,7 +436,7 @@
     2.4  		lib.jpeg_calc_output_dimensions(&cinfo);
     2.5  
     2.6  		/* Allocate an output surface to hold the image */
     2.7 -		surface = SDL_AllocSurface(SDL_SWSURFACE,
     2.8 +		surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
     2.9  		        cinfo.output_width, cinfo.output_height, 24,
    2.10  #if SDL_BYTEORDER == SDL_LIL_ENDIAN
    2.11  		                   0x0000FF, 0x00FF00, 0xFF0000,
     3.1 --- a/IMG_png.c	Sun Jan 22 23:20:50 2012 -0500
     3.2 +++ b/IMG_png.c	Sun Jan 22 23:46:29 2012 -0500
     3.3 @@ -481,7 +481,7 @@
     3.4  			                 (Uint8)transv->red,
     3.5  			                 (Uint8)transv->green,
     3.6  			                 (Uint8)transv->blue);
     3.7 -	        SDL_SetColorKey(surface, SDL_SRCCOLORKEY, ckey);
     3.8 +	        SDL_SetColorKey(surface, SDL_TRUE, ckey);
     3.9  	}
    3.10  
    3.11  	/* Create the array of pointers to image data */
     4.1 --- a/IMG_tga.c	Sun Jan 22 23:20:50 2012 -0500
     4.2 +++ b/IMG_tga.c	Sun Jan 22 23:46:29 2012 -0500
     4.3 @@ -235,7 +235,7 @@
     4.4  	    }
     4.5  	    free(pal);
     4.6  	    if(ckey >= 0)
     4.7 -		SDL_SetColorKey(img, SDL_SRCCOLORKEY, ckey);
     4.8 +		SDL_SetColorKey(img, SDL_TRUE, ckey);
     4.9  	} else {
    4.10  	    /* skip unneeded colormap */
    4.11  	    SDL_RWseek(src, palsiz, RW_SEEK_CUR);