mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Cleanup.
This commit is contained in:
parent
92000fcb57
commit
3b3120c04d
1 changed files with 8 additions and 6 deletions
|
@ -57,12 +57,14 @@ namespace entry
|
||||||
|
|
||||||
int32_t MainThreadEntry::threadFunc(void* _userData)
|
int32_t MainThreadEntry::threadFunc(void* _userData)
|
||||||
{
|
{
|
||||||
CFBundleRef mainBundle = CFBundleGetMainBundle();
|
CFBundleRef mainBundle = CFBundleGetMainBundle();
|
||||||
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
|
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
if (CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX))
|
if (CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX) )
|
||||||
chdir(path);
|
{
|
||||||
CFRelease(resourcesURL);
|
chdir(path);
|
||||||
|
}
|
||||||
|
CFRelease(resourcesURL);
|
||||||
|
|
||||||
MainThreadEntry* self = (MainThreadEntry*)_userData;
|
MainThreadEntry* self = (MainThreadEntry*)_userData;
|
||||||
int32_t result = main(self->m_argc, self->m_argv);
|
int32_t result = main(self->m_argc, self->m_argv);
|
||||||
|
|
Loading…
Reference in a new issue