Skip to content

Commit

Permalink
SDL3's SDL_Init returns bools
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr committed Nov 2, 2024
1 parent dde1926 commit 91030fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
{
SDL_SetAppMetadata("SDL Hello World Example", "1.0", "com.example.sdl-hello-world");

if (SDL_Init(SDL_INIT_VIDEO) == -1) {
if (!SDL_Init(SDL_INIT_VIDEO)) {
SDL_Log("SDL_Init(SDL_INIT_VIDEO) failed: %s", SDL_GetError());
return SDL_APP_FAILURE;
}
Expand Down

0 comments on commit 91030fb

Please sign in to comment.