Commit 148a1a64 authored by Sam Lantinga's avatar Sam Lantinga

Fixed gamma correction in Atari video drivers (thanks Patrice!)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40509
parent 291e8f9b
...@@ -600,7 +600,6 @@ SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current, ...@@ -600,7 +600,6 @@ SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current,
Uint32 modeflags, screensize; Uint32 modeflags, screensize;
SDL_bool use_shadow; SDL_bool use_shadow;
modeflags = SDL_HWPALETTE;
GEM_FreeBuffers(this); GEM_FreeBuffers(this);
/*--- Verify if asked mode can be used ---*/ /*--- Verify if asked mode can be used ---*/
...@@ -659,6 +658,11 @@ SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current, ...@@ -659,6 +658,11 @@ SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current,
} }
/*--- Initialize screen ---*/ /*--- Initialize screen ---*/
modeflags = 0;
if (VDI_bpp == 8) {
modeflags |= SDL_HWPALETTE;
}
if (flags & SDL_FULLSCREEN) { if (flags & SDL_FULLSCREEN) {
GEM_LockScreen(this); GEM_LockScreen(this);
......
...@@ -454,7 +454,7 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current, ...@@ -454,7 +454,7 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current,
return(NULL); return(NULL);
} }
modeflags = (SDL_FULLSCREEN|SDL_HWPALETTE); modeflags = SDL_FULLSCREEN;
/* Allocate needed buffers: simple/double buffer and shadow surface */ /* Allocate needed buffers: simple/double buffer and shadow surface */
new_video_mode = XBIOS_videomodes[bpp][mode]; new_video_mode = XBIOS_videomodes[bpp][mode];
...@@ -475,7 +475,7 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current, ...@@ -475,7 +475,7 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current,
} else { } else {
Atari_C2pConvert = Atari_C2pConvert8; Atari_C2pConvert = Atari_C2pConvert8;
} }
modeflags |= SDL_SWSURFACE; modeflags |= SDL_SWSURFACE|SDL_HWPALETTE;
} else { } else {
modeflags |= SDL_HWSURFACE; modeflags |= SDL_HWSURFACE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment