summaryrefslogtreecommitdiff
path: root/Source/3rdParty/SDL2/src/video/SDL_surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/3rdParty/SDL2/src/video/SDL_surface.c')
-rw-r--r--Source/3rdParty/SDL2/src/video/SDL_surface.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/3rdParty/SDL2/src/video/SDL_surface.c b/Source/3rdParty/SDL2/src/video/SDL_surface.c
index 719f831..1b2ee6c 100644
--- a/Source/3rdParty/SDL2/src/video/SDL_surface.c
+++ b/Source/3rdParty/SDL2/src/video/SDL_surface.c
@@ -37,7 +37,7 @@ SDL_COMPILE_TIME_ASSERT(surface_size_assumptions,
/*
* Calculate the pad-aligned scanline width of a surface
*/
-int
+static int
SDL_CalculatePitch(Uint32 format, int width)
{
int pitch;
@@ -292,6 +292,20 @@ SDL_SetColorKey(SDL_Surface * surface, int flag, Uint32 key)
return 0;
}
+SDL_bool
+SDL_HasColorKey(SDL_Surface * surface)
+{
+ if (!surface) {
+ return SDL_FALSE;
+ }
+
+ if (!(surface->map->info.flags & SDL_COPY_COLORKEY)) {
+ return SDL_FALSE;
+ }
+
+ return SDL_TRUE;
+}
+
int
SDL_GetColorKey(SDL_Surface * surface, Uint32 * key)
{