brought back functionality from previous builds but now cross-platform
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#ifdef __APPLE__
|
||||
#include <mach-o/dyld.h>
|
||||
#endif
|
||||
#ifdef __WIN32__
|
||||
#include "windows.h"
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
#include "TargetConditionals.h"
|
||||
@@ -19,7 +22,9 @@
|
||||
// Other platforms
|
||||
#endif
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 4096
|
||||
#endif
|
||||
|
||||
static char szLauncherPath[MAX_PATH];
|
||||
static char szEnginePath[MAX_PATH];
|
||||
@@ -72,6 +77,11 @@ int main( int argc, char **argv ) {
|
||||
pEngineMain(argc, argv);
|
||||
dlclose(pEngineLib);
|
||||
#else
|
||||
#ifdef __WIN32__
|
||||
GetModuleFileNameA(NULL, szLauncherPath, MAX_PATH);
|
||||
dirname(szLauncherPath);
|
||||
SetCurrentDirectoryA(szLauncherPath);
|
||||
#endif
|
||||
FunnyMain(argc, argv);
|
||||
#endif
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user