static void* NVEventMainLoopThreadFunc(void*) { NVEventAppMain(0, NULL); __android_log_print(ANDROID_LOG_DEBUG, MODULE, "NvEvent native app Main returned"); // signal the condition variable to unblock // java from waiting on pause or quit unlockAll(&(s_eventQueue.m_javaSync)); s_alreadyFinishing = true; JNIEnv* env = NVThreadGetCurrentJNIEnv(); env->CallVoidMethod(s_globalThiz, s_finish); return NULL; }
static void* NVEventMainLoopThreadFunc(void*) { NVEventAppMain(0, NULL); __android_log_print(ANDROID_LOG_DEBUG, MODULE, "NvEvent native app Main returned"); // signal the condition variable to unblock // java from waiting on pause or quit s_eventQueue.UnblockProducer(); s_appThreadExited = true; // IF that app main returned because we posted a QUIT, then Java knows what to // do regarding lifecycle. But, if the app returned from main of its own accord, // we need to call finish. if (!s_javaPostedQuit) { JNIEnv* env = NVThreadGetCurrentJNIEnv(); env->CallVoidMethod(s_globalThiz, s_finish.m_index); } return NULL; }