Fixed bug 5304 - add SDL_HasSurfaceRLE() (Thanks Rene Dudfield and Dan Lawrence)

This commit is contained in:
Sylvain Becker
2020-10-18 09:52:56 +02:00
parent 19a65a46a6
commit ffb307e4dc
4 changed files with 23 additions and 0 deletions

View File

@@ -249,6 +249,20 @@ SDL_SetSurfaceRLE(SDL_Surface * surface, int flag)
return 0;
}
SDL_bool
SDL_HasSurfaceRLE(SDL_Surface * surface)
{
if (!surface) {
return SDL_FALSE;
}
if (!(surface->map->info.flags & SDL_COPY_RLE_DESIRED)) {
return SDL_FALSE;
}
return SDL_TRUE;
}
int
SDL_SetColorKey(SDL_Surface * surface, int flag, Uint32 key)
{