use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError

This commit is contained in:
pionere 2022-01-17 16:26:02 +01:00 committed by Ryan C. Gordon
parent 4a17612bff
commit ebdd536676
36 changed files with 109 additions and 123 deletions

View file

@ -30,7 +30,7 @@ int
SDL_DrawPoint(SDL_Surface * dst, int x, int y, Uint32 color)
{
if (!dst) {
return SDL_SetError("Passed NULL destination surface");
return SDL_InvalidParamError("SDL_DrawPoint(): dst");
}
/* This function doesn't work on surfaces < 8 bpp */
@ -71,7 +71,7 @@ SDL_DrawPoints(SDL_Surface * dst, const SDL_Point * points, int count,
int x, y;
if (!dst) {
return SDL_SetError("Passed NULL destination surface");
return SDL_InvalidParamError("SDL_DrawPoints(): dst");
}
/* This function doesn't work on surfaces < 8 bpp */