void CruiseEngine::pauseEngine(bool pause) { Engine::pauseEngine(pause); if (pause) { // Draw the 'Paused' message drawSolidBox(64, 100, 256, 117, 0); drawString(10, 100, langString(ID_PAUSED), gfxModuleData.pPage00, itemColor, 300); gfxModuleData_flipScreen(); _savedCursor = currentCursor; changeCursor(CURSOR_NOMOUSE); } else { processAnimation(); flipScreen(); changeCursor(_savedCursor); } gfxModuleData_addDirtyRect(Common::Rect(64, 100, 256, 117)); }
/// This function is called from native c++ code string GetAndroidSystemLanguage() { static char const * DEFAULT_LANG = "en"; JNIEnv * env = jni::GetEnv(); if (!env) { LOG(LWARNING, ("Can't get JNIEnv")); return DEFAULT_LANG; } static jclass const localeClass = jni::GetGlobalClassRef(env, "java/util/Locale"); static jmethodID const localeGetDefaultId = jni::GetStaticMethodID(env, localeClass, "getDefault", "()Ljava/util/Locale;"); static jmethodID const localeToStringId = env->GetMethodID(localeClass, "toString", "()Ljava/lang/String;"); jni::TScopedLocalRef localeInstance(env, env->CallStaticObjectMethod(localeClass, localeGetDefaultId)); jni::TScopedLocalRef langString(env, env->CallObjectMethod(localeInstance.get(), localeToStringId)); string res = jni::ToNativeString(env, (jstring) langString.get()); if (res.empty()) res = DEFAULT_LANG; return ReplaceDeprecatedLanguageCode(res); }