diff options
author | 2016-05-27 20:57:02 +0200 | |
---|---|---|
committer | 2016-05-27 20:57:02 +0200 | |
commit | 913861105b76ed923e1b341cc5235792542c5d6b (patch) | |
tree | d8d7d2fe370d4aa3ad1426213fbb381165e9a5e7 /3rdparty/bgfx/examples/common/entry/entry_android.cpp | |
parent | 5469ca37600b3d4d241a0af2617f53f65d4adbff (diff) |
Update BGFX and BX (nw)
Diffstat (limited to '3rdparty/bgfx/examples/common/entry/entry_android.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/common/entry/entry_android.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/3rdparty/bgfx/examples/common/entry/entry_android.cpp b/3rdparty/bgfx/examples/common/entry/entry_android.cpp index b1e7266b623..78c9dccbefa 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_android.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_android.cpp @@ -110,7 +110,7 @@ namespace entry const char* argv[1] = { "android.so" }; m_mte.m_argc = 1; m_mte.m_argv = const_cast<char**>(argv); - + while (0 == m_app->destroyRequested) { int32_t num; @@ -140,7 +140,7 @@ namespace entry // Command from main thread: a new ANativeWindow is ready for use. Upon // receiving this command, android_app->window will contain the new window // surface. - if (m_window == NULL) + if (m_window != m_app->window) { m_window = m_app->window; bgfx::androidSetWindow(m_window); @@ -152,7 +152,10 @@ namespace entry WindowHandle defaultWindow = { 0 }; m_eventQueue.postSizeEvent(defaultWindow, width, height); - m_thread.init(MainThreadEntry::threadFunc, &m_mte); + if (!m_thread.isRunning() ) + { + m_thread.init(MainThreadEntry::threadFunc, &m_mte); + } } break; |