Skip to content

Commit

Permalink
Fixed gamma correction in Atari video drivers (thanks Patrice!)
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 5, 2002
1 parent 13885cd commit ac524cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/video/gem/SDL_gemvideo.c
Expand Up @@ -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 ---*/
Expand Down Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/video/xbios/SDL_xbios.c
Expand Up @@ -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];
Expand All @@ -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;
}
Expand Down

0 comments on commit ac524cf

Please sign in to comment.