@@ -285,7 +285,7 @@ int SDL_SetSurfaceRLE(SDL_Surface *surface, int flag)
285
285
int flags ;
286
286
287
287
if (surface == NULL ) {
288
- return -1 ;
288
+ return SDL_InvalidParamError ( "surface" ) ;
289
289
}
290
290
291
291
flags = surface -> map -> info .flags ;
@@ -468,7 +468,7 @@ int SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b)
468
468
int flags ;
469
469
470
470
if (surface == NULL ) {
471
- return -1 ;
471
+ return SDL_InvalidParamError ( "surface" ) ;
472
472
}
473
473
474
474
surface -> map -> info .r = r ;
@@ -490,7 +490,7 @@ int SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b)
490
490
int SDL_GetSurfaceColorMod (SDL_Surface * surface , Uint8 * r , Uint8 * g , Uint8 * b )
491
491
{
492
492
if (surface == NULL ) {
493
- return -1 ;
493
+ return SDL_InvalidParamError ( "surface" ) ;
494
494
}
495
495
496
496
if (r ) {
@@ -510,7 +510,7 @@ int SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha)
510
510
int flags ;
511
511
512
512
if (surface == NULL ) {
513
- return -1 ;
513
+ return SDL_InvalidParamError ( "surface" ) ;
514
514
}
515
515
516
516
surface -> map -> info .a = alpha ;
@@ -530,7 +530,7 @@ int SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha)
530
530
int SDL_GetSurfaceAlphaMod (SDL_Surface * surface , Uint8 * alpha )
531
531
{
532
532
if (surface == NULL ) {
533
- return -1 ;
533
+ return SDL_InvalidParamError ( "surface" ) ;
534
534
}
535
535
536
536
if (alpha ) {
@@ -544,7 +544,7 @@ int SDL_SetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode blendMode)
544
544
int flags , status ;
545
545
546
546
if (surface == NULL ) {
547
- return -1 ;
547
+ return SDL_InvalidParamError ( "surface" ) ;
548
548
}
549
549
550
550
status = 0 ;
@@ -581,7 +581,7 @@ int SDL_SetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode blendMode)
581
581
int SDL_GetSurfaceBlendMode (SDL_Surface * surface , SDL_BlendMode * blendMode )
582
582
{
583
583
if (surface == NULL ) {
584
- return -1 ;
584
+ return SDL_InvalidParamError ( "surface" ) ;
585
585
}
586
586
587
587
if (blendMode == NULL ) {
0 commit comments