Skip to content

Commit e5327f5

Browse files
sloukenicculus
authored andcommitted
Use the correct error return value from SDL_AppInit()
1 parent c3d8ce5 commit e5327f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dirksimple_sdl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
533533
const char *errstr = SDL_GetError();
534534
SDL_Log("Failed to initialize SDL: %s", errstr);
535535
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Failed to initialize SDL", errstr, NULL); // in case this works.
536-
return 1;
536+
return SDL_APP_FAILURE;
537537
}
538538

539539
#ifdef DIRKSIMPLE_FORCE_BASE_DIR // let Linux distros hardcode this to something under /usr/share, or whatever.
@@ -546,7 +546,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
546546
const char *errstr = SDL_GetError();
547547
SDL_Log("Failed to determine base dir: %s", errstr);
548548
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Failed to determine base dir", errstr, NULL); // in case this works.
549-
return 1;
549+
return SDL_APP_FAILURE;
550550
}
551551

552552
for (i = 1; i < argc; i++) {
@@ -580,7 +580,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
580580
if (!gamepath) {
581581
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Can't find a movie file!", "Include an .ogv file with the build or put it on the command line.", NULL);
582582
SDL_Quit();
583-
return 1;
583+
return SDL_APP_FAILURE;
584584
}
585585

586586
DirkSimple_startup(basedir, gamepath, gamename, DIRKSIMPLE_PIXFMT_IYUV);

0 commit comments

Comments
 (0)