mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 20:08:13 +00:00
Added missing calls to SDL_InvalidParamError("surface")
This commit is contained in:
@@ -285,7 +285,7 @@ int SDL_SetSurfaceRLE(SDL_Surface *surface, int flag)
|
|||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
if (surface == NULL) {
|
if (surface == NULL) {
|
||||||
return -1;
|
return SDL_InvalidParamError("surface");
|
||||||
}
|
}
|
||||||
|
|
||||||
flags = surface->map->info.flags;
|
flags = surface->map->info.flags;
|
||||||
@@ -468,7 +468,7 @@ int SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b)
|
|||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
if (surface == NULL) {
|
if (surface == NULL) {
|
||||||
return -1;
|
return SDL_InvalidParamError("surface");
|
||||||
}
|
}
|
||||||
|
|
||||||
surface->map->info.r = r;
|
surface->map->info.r = r;
|
||||||
@@ -490,7 +490,7 @@ int SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b)
|
|||||||
int SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b)
|
int SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b)
|
||||||
{
|
{
|
||||||
if (surface == NULL) {
|
if (surface == NULL) {
|
||||||
return -1;
|
return SDL_InvalidParamError("surface");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r) {
|
if (r) {
|
||||||
@@ -510,7 +510,7 @@ int SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha)
|
|||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
if (surface == NULL) {
|
if (surface == NULL) {
|
||||||
return -1;
|
return SDL_InvalidParamError("surface");
|
||||||
}
|
}
|
||||||
|
|
||||||
surface->map->info.a = alpha;
|
surface->map->info.a = alpha;
|
||||||
@@ -530,7 +530,7 @@ int SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha)
|
|||||||
int SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha)
|
int SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha)
|
||||||
{
|
{
|
||||||
if (surface == NULL) {
|
if (surface == NULL) {
|
||||||
return -1;
|
return SDL_InvalidParamError("surface");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alpha) {
|
if (alpha) {
|
||||||
@@ -544,7 +544,7 @@ int SDL_SetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode blendMode)
|
|||||||
int flags, status;
|
int flags, status;
|
||||||
|
|
||||||
if (surface == NULL) {
|
if (surface == NULL) {
|
||||||
return -1;
|
return SDL_InvalidParamError("surface");
|
||||||
}
|
}
|
||||||
|
|
||||||
status = 0;
|
status = 0;
|
||||||
@@ -581,7 +581,7 @@ int SDL_SetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode blendMode)
|
|||||||
int SDL_GetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode *blendMode)
|
int SDL_GetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode *blendMode)
|
||||||
{
|
{
|
||||||
if (surface == NULL) {
|
if (surface == NULL) {
|
||||||
return -1;
|
return SDL_InvalidParamError("surface");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (blendMode == NULL) {
|
if (blendMode == NULL) {
|
||||||
|
Reference in New Issue
Block a user