You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Update the fallback input mapping for the Oculus mobile devices.
This commit is contained in:
@@ -63,6 +63,7 @@ GodotJavaWrapper::GodotJavaWrapper(JNIEnv *p_env, jobject p_godot_instance) {
|
||||
_get_surface = p_env->GetMethodID(cls, "getSurface", "()Landroid/view/Surface;");
|
||||
_is_activity_resumed = p_env->GetMethodID(cls, "isActivityResumed", "()Z");
|
||||
_vibrate = p_env->GetMethodID(cls, "vibrate", "(I)V");
|
||||
_get_input_fallback_mapping = p_env->GetMethodID(cls, "getInputFallbackMapping", "()Ljava/lang/String;");
|
||||
}
|
||||
|
||||
GodotJavaWrapper::~GodotJavaWrapper() {
|
||||
@@ -166,6 +167,16 @@ String GodotJavaWrapper::get_clipboard() {
|
||||
}
|
||||
}
|
||||
|
||||
String GodotJavaWrapper::get_input_fallback_mapping() {
|
||||
if (_get_input_fallback_mapping) {
|
||||
JNIEnv *env = ThreadAndroid::get_env();
|
||||
jstring fallback_mapping = (jstring)env->CallObjectMethod(godot_instance, _get_input_fallback_mapping);
|
||||
return jstring_to_string(fallback_mapping, env);
|
||||
} else {
|
||||
return String();
|
||||
}
|
||||
}
|
||||
|
||||
bool GodotJavaWrapper::has_set_clipboard() {
|
||||
return _set_clipboard != 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user