diff options
Diffstat (limited to 'Source/3rdParty/SDL2/src/render/software/SDL_rotate.c')
-rw-r--r-- | Source/3rdParty/SDL2/src/render/software/SDL_rotate.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/3rdParty/SDL2/src/render/software/SDL_rotate.c b/Source/3rdParty/SDL2/src/render/software/SDL_rotate.c index 4476204..09e099c 100644 --- a/Source/3rdParty/SDL2/src/render/software/SDL_rotate.c +++ b/Source/3rdParty/SDL2/src/render/software/SDL_rotate.c @@ -83,7 +83,9 @@ static Uint32 _colorkey(SDL_Surface *src) { Uint32 key = 0; - SDL_GetColorKey(src, &key); + if (SDL_HasColorKey(src)) { + SDL_GetColorKey(src, &key); + } return key; } @@ -424,8 +426,10 @@ SDLgfx_rotateSurface(SDL_Surface * src, double angle, int centerx, int centery, if (src == NULL) return NULL; - if (SDL_GetColorKey(src, &colorkey) == 0) { - colorKeyAvailable = SDL_TRUE; + if (SDL_HasColorKey(src)) { + if (SDL_GetColorKey(src, &colorkey) == 0) { + colorKeyAvailable = SDL_TRUE; + } } /* This function requires a 32-bit surface or 8-bit surface with a colorkey */ |