mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-03 02:17:39 +00:00
Tests: Use the main callback code macros
This commit is contained in:
parent
7d81e9d46c
commit
06aa02453a
7 changed files with 68 additions and 64 deletions
|
@ -1042,7 +1042,7 @@ int SDL_AppInit(void **appstate, int argc, char *argv[])
|
|||
|
||||
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO | SDL_INIT_AUDIO);
|
||||
if (!state) {
|
||||
return -1;
|
||||
return SDL_MAIN_CALLBACK_EXIT_FAILURE;
|
||||
}
|
||||
|
||||
state->window_flags |= SDL_WINDOW_RESIZABLE;
|
||||
|
@ -1060,13 +1060,13 @@ int SDL_AppInit(void **appstate, int argc, char *argv[])
|
|||
NULL
|
||||
};
|
||||
SDLTest_CommonLogUsage(state, argv[0], options);
|
||||
return -1;
|
||||
return SDL_MAIN_CALLBACK_EXIT_FAILURE;
|
||||
}
|
||||
i += consumed;
|
||||
}
|
||||
|
||||
if (!SDLTest_CommonInit(state)) {
|
||||
return -1;
|
||||
return SDL_MAIN_CALLBACK_EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (state->audio_id) {
|
||||
|
@ -1088,7 +1088,7 @@ int SDL_AppInit(void **appstate, int argc, char *argv[])
|
|||
CreateDefaultPhysicalDevice(SDL_FALSE);
|
||||
CreateDefaultPhysicalDevice(SDL_TRUE);
|
||||
|
||||
return 0;
|
||||
return SDL_MAIN_CALLBACK_CONTINUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1229,7 +1229,7 @@ int SDL_AppIterate(void *appstate)
|
|||
SDL_Delay(10);
|
||||
}
|
||||
|
||||
return 0; /* keep going. */
|
||||
return SDL_MAIN_CALLBACK_CONTINUE;
|
||||
}
|
||||
|
||||
void SDL_AppQuit(void *appstate)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue