changed function to check if a surface has a color key
[rocksndiamonds.git] / 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)
 {
 
 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)
 }
 
 static boolean SDLHasAlpha(SDL_Surface *surface)