Skip to content

Commit

Permalink
Updated for SDL3 change to use SDL_bool instead of int return code
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Aug 27, 2024
1 parent 8daafb8 commit 7952e78
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/showanim.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ int main(int argc, char *argv[])
}
}

if (SDL_Init(SDL_INIT_VIDEO) == -1) {
if (!SDL_Init(SDL_INIT_VIDEO)) {
SDL_Log("SDL_Init(SDL_INIT_VIDEO) failed: %s\n", SDL_GetError());
return(2);
}

if (SDL_CreateWindowAndRenderer("animation demo", 0, 0, flags, &window, &renderer) < 0) {
if (!SDL_CreateWindowAndRenderer("animation demo", 0, 0, flags, &window, &renderer)) {
SDL_Log("SDL_CreateWindowAndRenderer() failed: %s\n", SDL_GetError());
return(2);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/showimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ int main(int argc, char *argv[])
}
}

if (SDL_Init(SDL_INIT_VIDEO) == -1) {
if (!SDL_Init(SDL_INIT_VIDEO)) {
SDL_Log("SDL_Init(SDL_INIT_VIDEO) failed: %s\n", SDL_GetError());
result = 2;
goto done;
Expand Down
2 changes: 1 addition & 1 deletion external/SDL
Submodule SDL updated 1015 files

0 comments on commit 7952e78

Please sign in to comment.