From 2ec55fd974a63b705a4777c256d2222c874fa043 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 31 Jan 2019 18:38:35 +0800 Subject: *SDL project --- Source/3rdParty/SDL2/src/video/SDL_surface.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Source/3rdParty/SDL2/src/video/SDL_surface.c') 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) { -- cgit v1.1-26-g67d0