IMG_pnm.c
changeset 320 aa5d55b11751
parent 280 ec4ae96c100c
child 343 5bf0f0d6a74e
     1.1 --- a/IMG_pnm.c	Sun Jan 22 20:11:17 2012 -0500
     1.2 +++ b/IMG_pnm.c	Sun Jan 22 21:52:00 2012 -0500
     1.3 @@ -149,7 +149,7 @@
     1.4  
     1.5  	if(kind == PPM) {
     1.6  		/* 24-bit surface in R,G,B byte order */
     1.7 -		surface = SDL_AllocSurface(SDL_SWSURFACE, width, height, 24,
     1.8 +		surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 24,
     1.9  #if SDL_BYTEORDER == SDL_LIL_ENDIAN
    1.10  					   0x000000ff, 0x0000ff00, 0x00ff0000,
    1.11  #else
    1.12 @@ -158,7 +158,7 @@
    1.13  					   0);
    1.14  	} else {
    1.15  		/* load PBM/PGM as 8-bit indexed images */
    1.16 -		surface = SDL_AllocSurface(SDL_SWSURFACE, width, height, 8,
    1.17 +		surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 8,
    1.18  					   0, 0, 0, 0);
    1.19  	}
    1.20  	if ( surface == NULL )