| 120 | } |
| 121 | |
| 122 | JNIEnv* NativeEngine::GetJniEnv() { |
| 123 | if (!mJniEnv) { |
| 124 | LOGD("Attaching current thread to JNI."); |
| 125 | if (0 != mApp->activity->vm->AttachCurrentThread(&mJniEnv, NULL)) { |
| 126 | LOGE("*** FATAL ERROR: Failed to attach thread to JNI."); |
| 127 | ABORT_GAME; |
| 128 | } |
| 129 | MY_ASSERT(mJniEnv != NULL); |
| 130 | LOGD("Attached current thread to JNI, %p", mJniEnv); |
| 131 | } |
| 132 | |
| 133 | return mJniEnv; |
| 134 | } |
| 135 | |
| 136 | void NativeEngine::HandleCommand(int32_t cmd) { |
| 137 | SceneManager* mgr = SceneManager::GetInstance(); |
no test coverage detected