Skip to content

Commit

Permalink
allow to compile windows build via dockcross
Browse files Browse the repository at this point in the history
  • Loading branch information
ZelionD committed Jan 14, 2025
1 parent 51fde7b commit 83a4cd7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/platform/augustus.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define SDL_MAIN_HANDLED
#include "SDL.h"

#include "core/config.h"
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const char *system_architecture(void)
}

#if defined(_WIN32) || defined(_WIN64)
#include <Windows.h>
#include <windows.h>
#elif defined (__GNUC__) && !defined (__SWITCH__)
#include <sys/utsname.h>
#endif
Expand Down

0 comments on commit 83a4cd7

Please sign in to comment.