Improve logging performance and make log priorities thread-safe

Fixes https://github.com/libsdl-org/SDL/issues/9679
This commit is contained in:
Sam Lantinga
2024-09-16 12:34:42 -07:00
parent f006d61bd1
commit dc639956ba
69 changed files with 289 additions and 349 deletions

View File

@@ -453,9 +453,6 @@ int main(int argc, char *argv[])
}
state->window_title = "CheckKeys Test";
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -56,9 +56,6 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
return SDL_APP_SUCCESS;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -712,9 +712,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -122,9 +122,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -63,9 +63,6 @@ int main(int argc, char **argv)
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -40,9 +40,6 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv)
return SDL_APP_SUCCESS;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -359,9 +359,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -59,9 +59,6 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
return SDL_APP_FAILURE;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -2005,9 +2005,6 @@ int main(int argc, char *argv[])
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
SDL_SetHint(SDL_HINT_JOYSTICK_LINUX_DEADZONES, "1");
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Enable input debug logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_INPUT, SDL_LOG_PRIORITY_DEBUG);

View File

@@ -382,9 +382,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
for (i = 1; i < argc;) {
int consumed;

View File

@@ -62,9 +62,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -45,9 +45,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -226,9 +226,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
for (i = 1; i < argc;) {
int consumed;

View File

@@ -111,9 +111,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -34,9 +34,6 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
return SDL_APP_FAILURE;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
for (i = 1; i < argc;) {
int consumed;

View File

@@ -58,9 +58,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -76,9 +76,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -70,9 +70,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -194,9 +194,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
for (i = 1; i < argc;) {
int consumed;

View File

@@ -231,9 +231,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
for (i = 1; i < argc;) {
int consumed;

View File

@@ -115,9 +115,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
for (i = 1; i < argc;) {
int consumed;

View File

@@ -34,9 +34,6 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
return SDL_APP_FAILURE;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
state->skip_renderer = 1;
if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {

View File

@@ -49,8 +49,6 @@ int main(int argc, char **argv)
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -86,9 +86,6 @@ int main(int argc, char **argv)
state->window_flags = SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE;
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -38,9 +38,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;
@@ -65,9 +62,6 @@ int main(int argc, char *argv[])
init_subsystems |= SDL_INIT_HAPTIC;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
/* Initialize SDL (Note: video is required to start event loop) */

View File

@@ -88,9 +88,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -1039,9 +1039,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -295,9 +295,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
for (i = 1; i < argc;) {
int consumed;

View File

@@ -29,9 +29,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -45,9 +45,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -45,9 +45,6 @@ int main(int argc, char **argv)
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -120,8 +120,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -499,9 +499,6 @@ int main(int argc, char *argv[])
{
int i;
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Log all events, including mouse motion */
SDL_SetHint(SDL_HINT_EVENT_LOGGING, "2");

View File

@@ -93,9 +93,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -31,9 +31,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -288,9 +288,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -147,9 +147,6 @@ int main(int argc, char **argv)
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -117,9 +117,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -100,9 +100,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -46,9 +46,6 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
return SDL_APP_FAILURE;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed = SDLTest_CommonArg(state, i);

View File

@@ -451,9 +451,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -248,9 +248,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -69,9 +69,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -567,9 +567,6 @@ int main(int argc, char *argv[])
runner = SDLTest_CreateTestSuiteRunner(state, testSuites);
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -138,9 +138,6 @@ static void loop(void)
int main(int argc, char *argv[])
{
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Initialize test framework */
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
if (!state) {

View File

@@ -124,9 +124,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {
SDLTest_CommonQuit(state);
return 1;

View File

@@ -224,9 +224,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
for (i = 1; i < argc;) {
int consumed;

View File

@@ -45,9 +45,6 @@ int main(int argc, char **argv)
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
SDL_zero(cvtspec);
/* Parse commandline */

View File

@@ -48,9 +48,6 @@ int main(int argc, char **argv)
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
name = NULL;
index = -1;

View File

@@ -73,8 +73,6 @@ int main(int argc, char *argv[])
SDL_AtomicSet(&doterminate, 0);
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -111,9 +111,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -266,9 +266,6 @@ int main(int argc, char **argv)
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -68,9 +68,6 @@ int main(int argc, char **argv)
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
SDL_Quit();
SDLTest_CommonDestroyState(state);

View File

@@ -458,9 +458,6 @@ int main(int argc, char **argv)
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -111,9 +111,6 @@ int main(int argc, char *argv[])
int return_code = -1;
int i;
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
if (argc > 1) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "USAGE: %s\n", argv[0]);
return_code = 1;

View File

@@ -105,9 +105,6 @@ int main(int argc, char *argv[])
int return_code = -1;
int i;
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
if (argc > 1) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "USAGE: %s\n", argv[0]);
return_code = 1;

View File

@@ -145,9 +145,6 @@ int main(int argc, char **argv)
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
SDL_Quit();
SDLTest_CommonDestroyState(state);

View File

@@ -157,9 +157,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
SDLTest_CommonQuit(state);
return 1;

View File

@@ -98,9 +98,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -154,9 +154,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;

View File

@@ -89,9 +89,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -19,9 +19,6 @@
int main(int argc, char *argv[])
{
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
if (argc > 1) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "USAGE: %s", argv[0]);
return 1;

View File

@@ -1107,9 +1107,6 @@ int main(int argc, char **argv)
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Set Vulkan parameters */
state->window_flags |= SDL_WINDOW_VULKAN;
state->skip_renderer = 1;

View File

@@ -264,9 +264,7 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {
SDLTest_CommonQuit(state);
return 1;

View File

@@ -305,9 +305,6 @@ int main(int argc, char **argv)
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;

View File

@@ -89,15 +89,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Load the SDL library */
if (!SDL_Init(0)) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError());
return 1;
}
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
SDL_Quit();
SDLTest_CommonDestroyState(state);