showimage.c
changeset 20 463951886af1
parent 18 a13d6443bf9c
child 30 d3248d17a4a6
     1.1 --- a/showimage.c	Sat Feb 17 01:46:37 2001 +0000
     1.2 +++ b/showimage.c	Tue Feb 27 20:45:58 2001 +0000
     1.3 @@ -118,6 +118,8 @@
     1.4  		if ( (image->format->BytesPerPixel > 1) && (depth == 8) ) {
     1.5  	    		depth = 32;
     1.6  		}
     1.7 +		if(depth == 8)
     1.8 +			flags |= SDL_HWPALETTE;
     1.9  		screen = SDL_SetVideoMode(image->w, image->h, depth, flags);
    1.10  		if ( screen == NULL ) {
    1.11  			fprintf(stderr,"Couldn't set %dx%dx%d video mode: %s\n",