1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

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

@ -25,7 +25,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;