src/SDL12_compat.c
changeset 74 4e3e77f78520
parent 73 040f36454e95
child 75 00631178b6d5
     1.1 --- a/src/SDL12_compat.c	Tue Feb 19 16:40:20 2019 -0500
     1.2 +++ b/src/SDL12_compat.c	Tue Feb 19 16:41:05 2019 -0500
     1.3 @@ -2227,6 +2227,17 @@
     1.4  }
     1.5  
     1.6  DECLSPEC int SDLCALL
     1.7 +SDL_SetColorKey(SDL12_Surface *surface12, Uint32 flag12, Uint32 key)
     1.8 +{
     1.9 +    const SDL_bool addkey = (flag12 & SDL12_SRCCOLORKEY) ? SDL_TRUE : SDL_FALSE;
    1.10 +    const int retval = SDL20_SetColorKey(surface12->surface20, addkey, key);
    1.11 +    if (SDL20_GetColorKey(surface12->surface20, &surface12->format->colorkey) < 0) {
    1.12 +        surface12->format->colorkey = 0;
    1.13 +    }
    1.14 +    return retval;
    1.15 +}
    1.16 +
    1.17 +DECLSPEC int SDLCALL
    1.18  SDL_SetPalette(SDL12_Surface *surface12, int flags, const SDL_Color *colors,
    1.19                 int firstcolor, int ncolors)
    1.20  {