Merge branch 'master' into encoder
This commit is contained in:
commit
d97023ab85
@ -88,7 +88,7 @@ namespace entry
|
|||||||
int m_argc;
|
int m_argc;
|
||||||
const char* const* m_argv;
|
const char* const* m_argv;
|
||||||
|
|
||||||
static int32_t threadFunc(void* _userData);
|
static int32_t threadFunc(bx::Thread* _thread, void* _userData);
|
||||||
};
|
};
|
||||||
|
|
||||||
class FileReaderAndroid : public bx::FileReaderI
|
class FileReaderAndroid : public bx::FileReaderI
|
||||||
@ -550,8 +550,10 @@ namespace entry
|
|||||||
BX_UNUSED(_handle, _lock);
|
BX_UNUSED(_handle, _lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t MainThreadEntry::threadFunc(void* _userData)
|
int32_t MainThreadEntry::threadFunc(bx::Thread* _thread, void* _userData)
|
||||||
{
|
{
|
||||||
|
BX_UNUSED(_thread);
|
||||||
|
|
||||||
int32_t result = chdir("/sdcard/bgfx/examples/runtime");
|
int32_t result = chdir("/sdcard/bgfx/examples/runtime");
|
||||||
BX_CHECK(0 == result, "Failed to chdir to dir. android.permission.WRITE_EXTERNAL_STORAGE?", errno);
|
BX_CHECK(0 == result, "Failed to chdir to dir. android.permission.WRITE_EXTERNAL_STORAGE?", errno);
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ namespace entry
|
|||||||
int m_argc;
|
int m_argc;
|
||||||
const char* const* m_argv;
|
const char* const* m_argv;
|
||||||
|
|
||||||
static int32_t threadFunc(void* _userData);
|
static int32_t threadFunc(bx::Thread* _thread, void* _userData);
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MsgType
|
enum MsgType
|
||||||
@ -837,8 +837,10 @@ namespace entry
|
|||||||
glfwPostEmptyEvent();
|
glfwPostEmptyEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t MainThreadEntry::threadFunc(void* _userData)
|
int32_t MainThreadEntry::threadFunc(bx::Thread* _thread, void* _userData)
|
||||||
{
|
{
|
||||||
|
BX_UNUSED(_thread);
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace entry
|
|||||||
int m_argc;
|
int m_argc;
|
||||||
const char* const* m_argv;
|
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 };
|
static WindowHandle s_defaultWindow = { 0 };
|
||||||
@ -63,19 +63,22 @@ namespace entry
|
|||||||
|
|
||||||
static Context* s_ctx;
|
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();
|
CFBundleRef mainBundle = CFBundleGetMainBundle();
|
||||||
if ( mainBundle != nil )
|
if (mainBundle != nil)
|
||||||
{
|
{
|
||||||
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
|
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
|
||||||
if ( resourcesURL != nil )
|
if (resourcesURL != nil)
|
||||||
{
|
{
|
||||||
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);
|
chdir(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
CFRelease(resourcesURL);
|
CFRelease(resourcesURL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,19 +66,22 @@ namespace entry
|
|||||||
int m_argc;
|
int m_argc;
|
||||||
const char* const* m_argv;
|
const char* const* m_argv;
|
||||||
|
|
||||||
static int32_t threadFunc(void* _userData)
|
static int32_t threadFunc(bx::Thread* _thread, void* _userData);
|
||||||
{
|
{
|
||||||
|
BX_UNUSED(_thread);
|
||||||
|
|
||||||
CFBundleRef mainBundle = CFBundleGetMainBundle();
|
CFBundleRef mainBundle = CFBundleGetMainBundle();
|
||||||
if ( mainBundle != nil )
|
if (mainBundle != nil)
|
||||||
{
|
{
|
||||||
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
|
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
|
||||||
if ( resourcesURL != nil )
|
if (resourcesURL != nil)
|
||||||
{
|
{
|
||||||
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);
|
chdir(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
CFRelease(resourcesURL);
|
CFRelease(resourcesURL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -249,7 +249,7 @@ namespace entry
|
|||||||
int m_argc;
|
int m_argc;
|
||||||
char** m_argv;
|
char** m_argv;
|
||||||
|
|
||||||
static int32_t threadFunc(void* _userData);
|
static int32_t threadFunc(bx::Thread* _thread, void* _userData);
|
||||||
};
|
};
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -1090,8 +1090,10 @@ namespace entry
|
|||||||
sdlPostEvent(SDL_USER_WINDOW_MOUSE_LOCK, _handle, NULL, _lock);
|
sdlPostEvent(SDL_USER_WINDOW_MOUSE_LOCK, _handle, NULL, _lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t MainThreadEntry::threadFunc(void* _userData)
|
int32_t MainThreadEntry::threadFunc(bx::Thread* _thread, void* _userData)
|
||||||
{
|
{
|
||||||
|
BX_UNUSED(_thread);
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ namespace entry
|
|||||||
int32_t m_argc;
|
int32_t m_argc;
|
||||||
const char* const* m_argv;
|
const char* const* m_argv;
|
||||||
|
|
||||||
static int32_t threadFunc(void* _userData);
|
static int32_t threadFunc(bx::Thread* _thread, void* _userData);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Msg
|
struct Msg
|
||||||
@ -679,8 +679,10 @@ namespace entry
|
|||||||
|
|
||||||
static Context s_ctx;
|
static Context s_ctx;
|
||||||
|
|
||||||
int32_t MainThreadEntry::threadFunc(void* _userData)
|
int32_t MainThreadEntry::threadFunc(bx::Thread* _thread, void* _userData)
|
||||||
{
|
{
|
||||||
|
BX_UNUSED(_thread);
|
||||||
|
|
||||||
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);
|
||||||
s_ctx.m_exit = true;
|
s_ctx.m_exit = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user