Moved android_app object to global scope

This commit is contained in:
saschawillems 2017-01-18 19:21:40 +01:00
parent 3dfb17c89a
commit 839fc84d69
7 changed files with 40 additions and 51 deletions

View file

@ -188,7 +188,6 @@ public:
HWND window;
HINSTANCE windowInstance;
#elif defined(__ANDROID__)
android_app* androidApp;
// true if application has focused, false if moved to background
bool focused = false;
#elif defined(__linux__)
@ -359,7 +358,7 @@ void android_main(android_app* state) \
state->userData = vulkanExample; \
state->onAppCmd = VulkanExample::handleAppCommand; \
state->onInputEvent = VulkanExample::handleAppInput; \
vulkanExample->androidApp = state; \
androidApp = state; \
vulkanExample->renderLoop(); \
delete(vulkanExample); \
}