Return from main() instead of calling exit()
This commit is contained in:
@@ -716,7 +716,7 @@ int main(int argc, char *argv[])
|
|||||||
if (argv[i][0] == '-') {
|
if (argv[i][0] == '-') {
|
||||||
static const char *options[] = { "[--bind-touchpad]", NULL };
|
static const char *options[] = { "[--bind-touchpad]", NULL };
|
||||||
SDLTest_CommonLogUsage(state, argv[0], options);
|
SDLTest_CommonLogUsage(state, argv[0], options);
|
||||||
exit(1);
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -728,7 +728,7 @@ int main(int argc, char *argv[])
|
|||||||
/* Initialize SDL (Note: video is required to start event loop) */
|
/* Initialize SDL (Note: video is required to start event loop) */
|
||||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) {
|
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError());
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError());
|
||||||
exit(1);
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a window to display joystick axis position */
|
/* Create a window to display joystick axis position */
|
||||||
|
|||||||
Reference in New Issue
Block a user