mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 17:36:25 +00:00
Fixed bug 5304 - add SDL_HasSurfaceRLE() (Thanks Rene Dudfield and Dan Lawrence)
This commit is contained in:
@@ -767,3 +767,4 @@
|
||||
#define SDL_SIMDRealloc SDL_SIMDRealloc_REAL
|
||||
#define SDL_AndroidRequestPermission SDL_AndroidRequestPermission_REAL
|
||||
#define SDL_OpenURL SDL_OpenURL_REAL
|
||||
#define SDL_HasSurfaceRLE SDL_HasSurfaceRLE_REAL
|
||||
|
@@ -828,3 +828,4 @@ SDL_DYNAPI_PROC(void*,SDL_SIMDRealloc,(void *a, const size_t b),(a, b),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_AndroidRequestPermission,(const char *a),(a),return)
|
||||
#endif
|
||||
SDL_DYNAPI_PROC(int,SDL_OpenURL,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasSurfaceRLE,(SDL_Surface *a),(a),return)
|
||||
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user