diff options
author | chai <chaifix@163.com> | 2019-01-31 18:38:35 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-01-31 18:38:35 +0800 |
commit | 2ec55fd974a63b705a4777c256d2222c874fa043 (patch) | |
tree | 48f1fea59ee9fc713a28a9aac3f05b98dc5ae66f /Source/3rdParty/SDL2/src/video/SDL_surface.c | |
parent | c581dfbf1e849f393861d15e82aa6446c0c1c310 (diff) |
*SDL project
Diffstat (limited to 'Source/3rdParty/SDL2/src/video/SDL_surface.c')
-rw-r--r-- | Source/3rdParty/SDL2/src/video/SDL_surface.c | 16 |
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) { |