From 51562f6fd85247891c0d472b94f3324a50dedcc7 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Tue, 31 Mar 2020 15:37:51 +0100 Subject: [PATCH] Use standard `main` return values `WinMain` has weird rules for this, and they don't match `main`. --- src/Main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Main.cpp b/src/Main.cpp index 449eab6f..305e18ab 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include "SDL.h" @@ -220,12 +221,12 @@ int main(int argc, char *argv[]) if (conf.display_mode == 1) { if (!StartDirectDraw(lpWindowName, windowWidth, windowHeight, 0)) - return 0; + return EXIT_FAILURE; } else { if (!StartDirectDraw(lpWindowName, windowWidth, windowHeight, 1)) - return 0; + return EXIT_FAILURE; } #else // Doesn't handle StartDirectDraw failing @@ -246,7 +247,7 @@ int main(int argc, char *argv[]) #ifdef FIX_BUGS if (!StartDirectDraw(lpWindowName, windowWidth, windowHeight, 2)) - return 0; + return EXIT_FAILURE; #else // Doesn't handle StartDirectDraw failing StartDirectDraw(lpWindowName, windowWidth, windowHeight, 2); @@ -292,7 +293,7 @@ int main(int argc, char *argv[]) { SDL_FreeCursor(cursor); SDL_FreeSurface(cursor_surface); - return 1; + return EXIT_SUCCESS; } // Initialize sound @@ -320,7 +321,7 @@ int main(int argc, char *argv[]) SDL_FreeCursor(cursor); SDL_FreeSurface(cursor_surface); - return 1; + return EXIT_SUCCESS; } void InactiveWindow(void)