changed function to check if a surface has a color key
authorHolger Schemel <info@artsoft.org>
Sun, 25 Oct 2020 18:33:16 +0000 (19:33 +0100)
committerHolger Schemel <info@artsoft.org>
Sun, 25 Oct 2020 18:33:35 +0000 (19:33 +0100)
src/libgame/sdl.c

index a66049e97e0175cf9fef962ff2518d0d7a658ee2..cbdbdc1cfcac586f1a414bc5e2f3d053a3636d2b 100644 (file)
@@ -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)