src/SDL12_compat.c
changeset 74 4e3e77f78520
parent 73 040f36454e95
child 75 00631178b6d5
equal deleted inserted replaced
73:040f36454e95 74:4e3e77f78520
  2225     }
  2225     }
  2226     return state12;
  2226     return state12;
  2227 }
  2227 }
  2228 
  2228 
  2229 DECLSPEC int SDLCALL
  2229 DECLSPEC int SDLCALL
       
  2230 SDL_SetColorKey(SDL12_Surface *surface12, Uint32 flag12, Uint32 key)
       
  2231 {
       
  2232     const SDL_bool addkey = (flag12 & SDL12_SRCCOLORKEY) ? SDL_TRUE : SDL_FALSE;
       
  2233     const int retval = SDL20_SetColorKey(surface12->surface20, addkey, key);
       
  2234     if (SDL20_GetColorKey(surface12->surface20, &surface12->format->colorkey) < 0) {
       
  2235         surface12->format->colorkey = 0;
       
  2236     }
       
  2237     return retval;
       
  2238 }
       
  2239 
       
  2240 DECLSPEC int SDLCALL
  2230 SDL_SetPalette(SDL12_Surface *surface12, int flags, const SDL_Color *colors,
  2241 SDL_SetPalette(SDL12_Surface *surface12, int flags, const SDL_Color *colors,
  2231                int firstcolor, int ncolors)
  2242                int firstcolor, int ncolors)
  2232 {
  2243 {
  2233     FIXME("write me");
  2244     FIXME("write me");
  2234     return SDL20_Unsupported();
  2245     return SDL20_Unsupported();