From 433a29d7d6fae0b2b3824f92fafa3a34369c6843 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Mon, 9 Dec 2013 22:36:13 -0800 Subject: [PATCH] Use sdcard for loading data for Android examples. --- examples/common/entry/entry_android.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/common/entry/entry_android.cpp b/examples/common/entry/entry_android.cpp index d6b4975f4..53296db36 100644 --- a/examples/common/entry/entry_android.cpp +++ b/examples/common/entry/entry_android.cpp @@ -218,8 +218,11 @@ namespace entry int32_t MainThreadEntry::threadFunc(void* _userData) { + int32_t result = chdir("/sdcard/bgfx/examples/runtime"); + BX_CHECK(0 == result, "Failed to chdir to dir. android.permission.WRITE_EXTERNAL_STORAGE?", errno); + MainThreadEntry* self = (MainThreadEntry*)_userData; - int32_t result = main(self->m_argc, self->m_argv); + result = main(self->m_argc, self->m_argv); // PostMessage(s_ctx.m_hwnd, WM_QUIT, 0, 0); return result; }