Examples: SDL3: Update for API changes: SDL_Init() returns 0 on failure.

This commit is contained in:
ocornut
2024-09-03 19:05:32 +02:00
parent 6a7319543c
commit 4832027eb6
7 changed files with 23 additions and 16 deletions

View File

@@ -27,7 +27,7 @@
int main(int, char**)
{
// Setup SDL
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD) != 0)
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD))
{
printf("Error: SDL_Init(): %s\n", SDL_GetError());
return -1;