hostile-takeover/game/sdl/mac/SDLMain.mm
Nathan Fulton fff71efc11 SDL-OSX port improvements
- Add chatroom
- Add string input
- Update main() to support SDL2
- Change game files location to
~/Library/ApplicationSupport/HostileTakeover
- Open URLs with OS’s default browser
- Use Xcode default C/C++Objective-C compiler
- Remove game/sdl/mac/SDL.framework
- Use game/sdl/SDL2/osx/SDL2.framework
2016-08-24 16:19:45 -04:00

23 lines
618 B
Plaintext

#include <sys/param.h>
#include <unistd.h>
#include "SDL.h"
#include "SDLMain.h"
#include "game/sdl/hosthelpers.h"
// SDL2 will work without creating any NSApplications or AppDelegates.
// However, if we don't load MainMenu.xib, WI wont have menu bar items.
// So main calls HostHelpers::main which creats a Cocoa app and AppDelegate.
// Once loaded, the app delegate is responsible for making the call to SDL_main()
// to launch WI. At this point, argurments aren't passed through to WI.
int main(int argc, char *argv[])
{
wi::HostHelpers::main(argc, argv);
}
int SDL_main()
{
return SDL_main(0, NULL);
}