Fixed gamma correction in Atari video drivers (thanks Patrice!)
authorSam Lantinga <slouken@libsdl.org>
Sat, 05 Oct 2002 16:27:56 +0000
changeset 5089ff7e90aaa94
parent 507 7853b6af5957
child 509 dad72daf44b3
Fixed gamma correction in Atari video drivers (thanks Patrice!)
src/video/gem/SDL_gemvideo.c
src/video/xbios/SDL_xbios.c
     1.1 --- a/src/video/gem/SDL_gemvideo.c	Sat Oct 05 16:27:29 2002 +0000
     1.2 +++ b/src/video/gem/SDL_gemvideo.c	Sat Oct 05 16:27:56 2002 +0000
     1.3 @@ -600,7 +600,6 @@
     1.4  	Uint32 modeflags, screensize;
     1.5  	SDL_bool use_shadow;
     1.6  
     1.7 -	modeflags = SDL_HWPALETTE;
     1.8  	GEM_FreeBuffers(this);
     1.9  
    1.10  	/*--- Verify if asked mode can be used ---*/
    1.11 @@ -659,6 +658,11 @@
    1.12  	}
    1.13  
    1.14  	/*--- Initialize screen ---*/
    1.15 +	modeflags = 0;
    1.16 +	if (VDI_bpp == 8) {
    1.17 +		modeflags |= SDL_HWPALETTE;
    1.18 +	}
    1.19 +
    1.20  	if (flags & SDL_FULLSCREEN) {
    1.21  		GEM_LockScreen(this);
    1.22  
     2.1 --- a/src/video/xbios/SDL_xbios.c	Sat Oct 05 16:27:29 2002 +0000
     2.2 +++ b/src/video/xbios/SDL_xbios.c	Sat Oct 05 16:27:56 2002 +0000
     2.3 @@ -454,7 +454,7 @@
     2.4  		return(NULL);
     2.5  	}
     2.6  
     2.7 -	modeflags = (SDL_FULLSCREEN|SDL_HWPALETTE);
     2.8 +	modeflags = SDL_FULLSCREEN;
     2.9  
    2.10  	/* Allocate needed buffers: simple/double buffer and shadow surface */
    2.11  	new_video_mode = XBIOS_videomodes[bpp][mode];
    2.12 @@ -475,7 +475,7 @@
    2.13  		} else {
    2.14  			Atari_C2pConvert = Atari_C2pConvert8;
    2.15  		}
    2.16 -		modeflags |= SDL_SWSURFACE;
    2.17 +		modeflags |= SDL_SWSURFACE|SDL_HWPALETTE;
    2.18  	} else {
    2.19  		modeflags |= SDL_HWSURFACE;
    2.20  	}