Moved android_app object to global scope
This commit is contained in:
parent
3dfb17c89a
commit
839fc84d69
7 changed files with 40 additions and 51 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#if defined(__ANDROID__)
|
||||
|
||||
#include <android/log.h>
|
||||
#include <android_native_app_glue.h>
|
||||
#include <memory>
|
||||
|
||||
// Missing from the NDK
|
||||
|
|
@ -35,6 +36,9 @@ namespace std
|
|||
}
|
||||
}
|
||||
|
||||
// Global reference to android application object
|
||||
extern android_app* androidApp;
|
||||
|
||||
#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "vulkanExample", __VA_ARGS__))
|
||||
#define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "vulkanExample", __VA_ARGS__))
|
||||
#define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, "vulkanExample", __VA_ARGS__))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue