diff options
author | 2015-10-20 21:34:36 +0200 | |
---|---|---|
committer | 2015-10-20 21:34:36 +0200 | |
commit | a7b8acbe3eebcf17367baa642375cfa47ae4ea85 (patch) | |
tree | 854b859d6176802c0278f4b00de3f7c774e02dda /3rdparty/bgfx/examples/common/entry/entry_android.cpp | |
parent | 4610935e796661874bb4ee7ec6536d9423aeb7be (diff) | |
parent | 74aae76c4e3e257f99d139c4febb5d86d1419e50 (diff) |
Merge pull request #6 from mamedev/master
Sync to base master
Diffstat (limited to '3rdparty/bgfx/examples/common/entry/entry_android.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/common/entry/entry_android.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/3rdparty/bgfx/examples/common/entry/entry_android.cpp b/3rdparty/bgfx/examples/common/entry/entry_android.cpp index 2d7c852c86c..aef9fee938a 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_android.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_android.cpp @@ -7,7 +7,7 @@ #if ENTRY_CONFIG_USE_NATIVE && BX_PLATFORM_ANDROID -#include <bgfxplatform.h> +#include <bgfx/bgfxplatform.h> #include <stdio.h> #include <bx/thread.h> @@ -181,14 +181,22 @@ namespace entry break; case APP_CMD_GAINED_FOCUS: + { // Command from main thread: the app's activity window has gained // input focus. + WindowHandle defaultWindow = { 0 }; + m_eventQueue.postSuspendEvent(defaultWindow, Suspend::WillResume); break; + } case APP_CMD_LOST_FOCUS: + { // Command from main thread: the app's activity window has lost // input focus. + WindowHandle defaultWindow = { 0 }; + m_eventQueue.postSuspendEvent(defaultWindow, Suspend::WillSuspend); break; + } case APP_CMD_CONFIG_CHANGED: // Command from main thread: the current device configuration has changed. @@ -204,8 +212,12 @@ namespace entry break; case APP_CMD_RESUME: + { // Command from main thread: the app's activity has been resumed. + WindowHandle defaultWindow = { 0 }; + m_eventQueue.postSuspendEvent(defaultWindow, Suspend::DidResume); break; + } case APP_CMD_SAVE_STATE: // Command from main thread: the app should generate a new saved state @@ -216,8 +228,12 @@ namespace entry break; case APP_CMD_PAUSE: + { // Command from main thread: the app's activity has been paused. + WindowHandle defaultWindow = { 0 }; + m_eventQueue.postSuspendEvent(defaultWindow, Suspend::DidSuspend); break; + } case APP_CMD_STOP: // Command from main thread: the app's activity has been stopped. |