You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add support for the OpenXR Eye gaze interaction extension
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
This commit is contained in:
committed by
Fredia Huya-Kouadio
parent
a2f90d565a
commit
9e56e7a3ce
@@ -82,6 +82,7 @@ GodotJavaWrapper::GodotJavaWrapper(JNIEnv *p_env, jobject p_activity, jobject p_
|
||||
_end_benchmark_measure = p_env->GetMethodID(godot_class, "nativeEndBenchmarkMeasure", "(Ljava/lang/String;)V");
|
||||
_dump_benchmark = p_env->GetMethodID(godot_class, "nativeDumpBenchmark", "(Ljava/lang/String;)V");
|
||||
_get_gdextension_list_config_file = p_env->GetMethodID(godot_class, "getGDExtensionConfigFiles", "()[Ljava/lang/String;");
|
||||
_has_feature = p_env->GetMethodID(godot_class, "hasFeature", "(Ljava/lang/String;)Z");
|
||||
}
|
||||
|
||||
GodotJavaWrapper::~GodotJavaWrapper() {
|
||||
@@ -373,3 +374,15 @@ void GodotJavaWrapper::dump_benchmark(const String &benchmark_file) {
|
||||
env->CallVoidMethod(godot_instance, _dump_benchmark, j_benchmark_file);
|
||||
}
|
||||
}
|
||||
|
||||
bool GodotJavaWrapper::has_feature(const String &p_feature) const {
|
||||
if (_has_feature) {
|
||||
JNIEnv *env = get_jni_env();
|
||||
ERR_FAIL_NULL_V(env, false);
|
||||
|
||||
jstring j_feature = env->NewStringUTF(p_feature.utf8().get_data());
|
||||
return env->CallBooleanMethod(godot_instance, _has_feature, j_feature);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user