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

This commit is contained in:
Sam Lantinga
2002-10-05 16:27:56 +00:00
parent a4a1c4b851
commit 82c4de7a59
2 changed files with 7 additions and 3 deletions

View File

@@ -600,7 +600,6 @@ SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current,
Uint32 modeflags, screensize;
SDL_bool use_shadow;
modeflags = SDL_HWPALETTE;
GEM_FreeBuffers(this);
/*--- Verify if asked mode can be used ---*/
@@ -659,6 +658,11 @@ SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current,
}
/*--- Initialize screen ---*/
modeflags = 0;
if (VDI_bpp == 8) {
modeflags |= SDL_HWPALETTE;
}
if (flags & SDL_FULLSCREEN) {
GEM_LockScreen(this);

View File

@@ -454,7 +454,7 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current,
return(NULL);
}
modeflags = (SDL_FULLSCREEN|SDL_HWPALETTE);
modeflags = SDL_FULLSCREEN;
/* Allocate needed buffers: simple/double buffer and shadow surface */
new_video_mode = XBIOS_videomodes[bpp][mode];
@@ -475,7 +475,7 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current,
} else {
Atari_C2pConvert = Atari_C2pConvert8;
}
modeflags |= SDL_SWSURFACE;
modeflags |= SDL_SWSURFACE|SDL_HWPALETTE;
} else {
modeflags |= SDL_HWSURFACE;
}