|
|
@@ -29,7 +29,7 @@ namespace entry
|
|
|
int m_argc;
|
|
|
const char* const* m_argv;
|
|
|
|
|
|
- static int32_t threadFunc(void* _userData);
|
|
|
+ static int32_t threadFunc(bx::Thread* _thread, void* _userData);
|
|
|
};
|
|
|
|
|
|
static WindowHandle s_defaultWindow = { 0 };
|
|
|
@@ -63,19 +63,22 @@ namespace entry
|
|
|
|
|
|
static Context* s_ctx;
|
|
|
|
|
|
- int32_t MainThreadEntry::threadFunc(void* _userData)
|
|
|
+ int32_t MainThreadEntry::threadFunc(bx::Thread* _thread, void* _userData)
|
|
|
{
|
|
|
+ BX_UNUSED(_thread);
|
|
|
+
|
|
|
CFBundleRef mainBundle = CFBundleGetMainBundle();
|
|
|
- if ( mainBundle != nil )
|
|
|
+ if (mainBundle != nil)
|
|
|
{
|
|
|
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
|
|
|
- if ( resourcesURL != nil )
|
|
|
+ if (resourcesURL != nil)
|
|
|
{
|
|
|
char path[PATH_MAX];
|
|
|
- if (CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX) )
|
|
|
+ if (CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8*)path, PATH_MAX) )
|
|
|
{
|
|
|
chdir(path);
|
|
|
}
|
|
|
+
|
|
|
CFRelease(resourcesURL);
|
|
|
}
|
|
|
}
|