Merged in AuahDark/love/android-fix (pull request #116)

Tiny love.system.openURL fix
This commit is contained in:
Alex Szpakowski
2018-11-20 03:21:14 +00:00
+3 -3
View File
@@ -123,14 +123,14 @@ bool openURL(const std::string &url)
JNIEnv *env = (JNIEnv*) SDL_AndroidGetJNIEnv();
jclass activity = env->FindClass("org/love2d/android/GameActivity");
jmethodID openURL= env->GetStaticMethodID(activity, "openURL", "(Ljava/lang/String;)V");
jmethodID openURL = env->GetStaticMethodID(activity, "openURL", "(Ljava/lang/String;)Z");
jstring url_jstring = (jstring) env->NewStringUTF(url.c_str());
env->CallStaticVoidMethod(activity, openURL, url_jstring);
jboolean result = env->CallStaticBooleanMethod(activity, openURL, url_jstring);
env->DeleteLocalRef(url_jstring);
env->DeleteLocalRef(activity);
return true;
return result;
}
void vibrate(double seconds)