Changed main callback return values to an enumeration

Fixes https://github.com/libsdl-org/SDL/issues/10515
This commit is contained in:
Sam Lantinga 2024-08-16 09:54:35 -07:00
parent 83adcb9d38
commit 438a214420
24 changed files with 180 additions and 207 deletions

View file

@ -42,7 +42,7 @@ static int fillerup(void)
return SDL_APP_CONTINUE;
}
int SDL_AppInit(void **appstate, int argc, char *argv[])
SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
{
int i;
char *filename = NULL;
@ -120,12 +120,12 @@ int SDL_AppInit(void **appstate, int argc, char *argv[])
return SDL_APP_CONTINUE;
}
int SDL_AppEvent(void *appstate, const SDL_Event *event)
SDL_AppResult SDL_AppEvent(void *appstate, const SDL_Event *event)
{
return (event->type == SDL_EVENT_QUIT) ? SDL_APP_SUCCESS : SDL_APP_CONTINUE;
}
int SDL_AppIterate(void *appstate)
SDL_AppResult SDL_AppIterate(void *appstate)
{
return fillerup();
}