mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-02 01:47:41 +00:00
Check standard error code return values as < 0 instead of == -1
This commit is contained in:
parent
46d9066a69
commit
037541a0e0
29 changed files with 59 additions and 59 deletions
|
@ -351,7 +351,7 @@ static int FlushRenderCommandsIfTextureNeeded(SDL_Texture *texture)
|
|||
|
||||
int SDL_FlushRenderer(SDL_Renderer *renderer)
|
||||
{
|
||||
if (FlushRenderCommands(renderer) == -1) {
|
||||
if (FlushRenderCommands(renderer) < 0) {
|
||||
return -1;
|
||||
}
|
||||
renderer->InvalidateCachedState(renderer);
|
||||
|
@ -1001,7 +1001,7 @@ SDL_Renderer *SDL_CreateRendererWithProperties(SDL_PropertiesID props)
|
|||
#else
|
||||
const int rc = SDL_SetError("SDL not built with software renderer");
|
||||
#endif
|
||||
if (rc == -1) {
|
||||
if (rc < 0) {
|
||||
goto error;
|
||||
}
|
||||
} else {
|
||||
|
@ -1034,7 +1034,7 @@ SDL_Renderer *SDL_CreateRendererWithProperties(SDL_PropertiesID props)
|
|||
}
|
||||
}
|
||||
|
||||
if (rc == -1) {
|
||||
if (rc < 0) {
|
||||
if (!name || !attempted) {
|
||||
SDL_SetError("Couldn't find matching render driver");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue