From 7b0c7193ca162428607ec507f337bbedb882f719 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 25 Oct 2020 19:33:16 +0100 Subject: [PATCH 1/1] changed function to check if a surface has a color key --- src/libgame/sdl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.34.1