diff --git a/src/platform/augustus.c b/src/platform/augustus.c index cc9d9246bc..c27f364113 100644 --- a/src/platform/augustus.c +++ b/src/platform/augustus.c @@ -1,3 +1,4 @@ +#define SDL_MAIN_HANDLED #include "SDL.h" #include "core/config.h" @@ -694,6 +695,14 @@ static void setup(const augustus_args *args) data.active = 1; } +#if (defined(_WIN32) || defined(_WIN64)) && !defined(_MSC_VER) +extern int __argc; +extern char ** __argv; +int main() { + SDL_SetMainReady(); + return SDL_main(__argc, __argv); +} +#endif int main(int argc, char **argv) { augustus_args args; diff --git a/src/platform/platform.c b/src/platform/platform.c index c8c51b231c..35c0358b61 100644 --- a/src/platform/platform.c +++ b/src/platform/platform.c @@ -58,7 +58,7 @@ const char *system_architecture(void) } #if defined(_WIN32) || defined(_WIN64) -#include +#include #elif defined (__GNUC__) && !defined (__SWITCH__) #include #endif