Tests: Use the main callback code macros

This commit is contained in:
L zard
2024-05-27 17:31:55 +02:00
committed by Sam Lantinga
parent 7d81e9d46c
commit 06aa02453a
7 changed files with 68 additions and 64 deletions

View File

@@ -63,7 +63,7 @@ int SDL_AppIterate(void *appstate)
}
SDL_RenderPresent(renderer);
}
return 0; /* keep going */
return SDL_MAIN_CALLBACK_CONTINUE;
}
int SDL_AppInit(void **appstate, int argc, char *argv[]) {
@@ -74,7 +74,7 @@ int SDL_AppInit(void **appstate, int argc, char *argv[]) {
/* Initialize test framework */
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
if (!state) {
return -1; /* terminate with an error */
return SDL_MAIN_CALLBACK_EXIT_FAILURE;
}
/* Enable standard application logging */
@@ -107,10 +107,10 @@ int SDL_AppInit(void **appstate, int argc, char *argv[]) {
*appstate = dialog;
dialog->state = state;
return 0; /* continue */
return SDL_MAIN_CALLBACK_CONTINUE;
onerror:
SDLTest_CommonQuit(state);
return -1; /* terminate with an error */
return SDL_MAIN_CALLBACK_EXIT_FAILURE;
}
void SDL_AppQuit(void *appstate)