Skip to content

Commit

Permalink
try to fix mac build..
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielGibson committed Oct 9, 2024
1 parent cf720c5 commit 6f26d96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions neo/sys/osx/DOOMController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@

#include "sys/posix/posix_public.h"

// usually the following would be from SDL_main.h,
// but this way we should be able to avoid that header
// for better compatibility between SDL1.2 to SDL3
extern "C" int SDL_main( int argc, char *argv[] );

static char base_path[MAXPATHLEN];
static char exe_path[MAXPATHLEN];
static char save_path[MAXPATHLEN];
Expand Down
2 changes: 1 addition & 1 deletion neo/sys/osx/SDLMain.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// as SDL.h doesn't implicitly include SDL_main.h anymore,
// declare SDL_main() here. I think it's the only part of SDL_main.h we used,
// we implement it in DOOMController.mm an call it here in applicationDidFinishLaunching
extern int SDL_main( int argc, char *argv[] );
extern "C" int SDL_main( int argc, char *argv[] );
#else // SDL2 and SDL1.2
#include "SDL.h"
#endif
Expand Down

0 comments on commit 6f26d96

Please sign in to comment.