this must have been in previous commit
This commit is contained in:
@@ -7,6 +7,18 @@
|
||||
#include <mach-o/dyld.h>
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
#include "TargetConditionals.h"
|
||||
#if TARGET_OS_IPHONE
|
||||
// iOS
|
||||
#include "SDL3/SDL_main.h"
|
||||
#else
|
||||
// macOS
|
||||
#endif
|
||||
#else
|
||||
// Other platforms
|
||||
#endif
|
||||
|
||||
#define MAX_PATH 4096
|
||||
|
||||
static char szLauncherPath[MAX_PATH];
|
||||
@@ -18,7 +30,10 @@ void *pTier0Lib = NULL;
|
||||
typedef void (*EngineMainFn)(int argc, char** argv);
|
||||
EngineMainFn pEngineMain;
|
||||
|
||||
extern "C" void FunnyMain( int argc, char **argv );
|
||||
|
||||
int main( int argc, char **argv ) {
|
||||
#ifndef STATIC_BUILD
|
||||
#ifdef __linux__
|
||||
readlink("/proc/self/exe",szLauncherPath, MAX_PATH);
|
||||
dirname(szLauncherPath);
|
||||
@@ -35,7 +50,6 @@ int main( int argc, char **argv ) {
|
||||
snprintf(szEnginePath, MAX_PATH, "%s/libengine.dylib", szLauncherPath2);
|
||||
snprintf(szTier0Path, MAX_PATH, "%s/libtier0.dylib", szLauncherPath2);
|
||||
#endif
|
||||
|
||||
pTier0Lib = dlopen(szTier0Path, RTLD_NOW | RTLD_GLOBAL);
|
||||
if ( !pTier0Lib ) {
|
||||
printf("Failed to open libtier0\n");
|
||||
@@ -57,4 +71,7 @@ int main( int argc, char **argv ) {
|
||||
|
||||
pEngineMain(argc, argv);
|
||||
dlclose(pEngineLib);
|
||||
#else
|
||||
FunnyMain(argc, argv);
|
||||
#endif
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user