1
0
forked from mirrors/0ad

Fixes starting Atlas from in-game on OS X, patch by trompetin17, refs #2427

This was SVN commit r15821.
This commit is contained in:
historic_bruno
2014-09-28 07:03:51 +00:00
parent 9148e5609f
commit 5200ea0365
@@ -144,7 +144,19 @@ ATLASDLLIMPEXP void Atlas_StartWindow(const wchar_t* type)
int argc = 1;
char atlas[] = "atlas";
char *argv[] = {atlas, NULL};
#ifndef __WXOSX__
wxEntry(argc, argv);
#else
// Fix for OS X init (see http://trac.wildfiregames.com/ticket/2427 )
// If we launched from in-game, SDL started NSApplication which will
// break some things in wxWidgets
wxEntryStart(argc, argv);
wxTheApp->OnInit();
wxTheApp->OnRun();
wxTheApp->OnExit();
wxEntryCleanup();
#endif
#endif
}
@@ -175,6 +187,13 @@ class AtlasDLLApp : public wxApp
{
public:
#ifdef __WXOSX__
virtual bool OSXIsGUIApplication()
{
return false;
}
#endif
virtual bool OnInit()
{
// _CrtSetBreakAlloc(5632);