mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-03 18:37:40 +00:00
Changed main callback return values to an enumeration
Fixes https://github.com/libsdl-org/SDL/issues/10515
This commit is contained in:
parent
83adcb9d38
commit
438a214420
24 changed files with 180 additions and 207 deletions
|
@ -49,7 +49,7 @@ static void SDLCALL FeedTheAudioStreamMore(void *userdata, SDL_AudioStream *astr
|
|||
}
|
||||
|
||||
/* This function runs once at startup. */
|
||||
int SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
{
|
||||
SDL_AudioSpec spec;
|
||||
|
||||
|
@ -83,7 +83,7 @@ int SDL_AppInit(void **appstate, int argc, char *argv[])
|
|||
}
|
||||
|
||||
/* This function runs when a new event (mouse input, keypresses, etc) occurs. */
|
||||
int SDL_AppEvent(void *appstate, const SDL_Event *event)
|
||||
SDL_AppResult SDL_AppEvent(void *appstate, const SDL_Event *event)
|
||||
{
|
||||
if (event->type == SDL_EVENT_QUIT) {
|
||||
return SDL_APP_SUCCESS; /* end the program, reporting success to the OS. */
|
||||
|
@ -92,7 +92,7 @@ int SDL_AppEvent(void *appstate, const SDL_Event *event)
|
|||
}
|
||||
|
||||
/* This function runs once per frame, and is the heart of the program. */
|
||||
int SDL_AppIterate(void *appstate)
|
||||
SDL_AppResult SDL_AppIterate(void *appstate)
|
||||
{
|
||||
/* we're not doing anything with the renderer, so just blank it out. */
|
||||
SDL_RenderClear(renderer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue