From efd530827a6c4fbd0922259131c4ac54badd5a6d Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 9 Jul 2023 20:42:00 -0700
Subject: [PATCH] Return from main() instead of calling exit()
---
test/gamepadmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/gamepadmap.c b/test/gamepadmap.c
index 63d2af878f65..796f9097a021 100644
--- a/test/gamepadmap.c
+++ b/test/gamepadmap.c
@@ -716,7 +716,7 @@ int main(int argc, char *argv[])
if (argv[i][0] == '-') {
static const char *options[] = { "[--bind-touchpad]", NULL };
SDLTest_CommonLogUsage(state, argv[0], options);
- exit(1);
+ return 1;
} else {
break;
}
@@ -728,7 +728,7 @@ int main(int argc, char *argv[])
/* Initialize SDL (Note: video is required to start event loop) */
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) {
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 */