From: Holger Schemel Date: Sun, 25 Oct 2020 18:33:16 +0000 (+0100) Subject: changed function to check if a surface has a color key X-Git-Tag: 4.2.0.4~7 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=7b0c7193ca162428607ec507f337bbedb882f719 changed function to check if a surface has a color key --- diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index a66049e9..cbdbdc1c 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -309,7 +309,9 @@ static Pixel SDLGetColorKey(SDL_Surface *surface) static boolean SDLHasColorKey(SDL_Surface *surface) { - return (SDLGetColorKey(surface) != -1); + Pixel color_key; + + return (SDL_GetColorKey(surface, &color_key) == 0); } static boolean SDLHasAlpha(SDL_Surface *surface)