mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Enable granular control of touchscreen related settings
This commit is contained in:
parent
b0c399ec8c
commit
61e41facc7
7 changed files with 64 additions and 14 deletions
|
@ -53,6 +53,10 @@
|
|||
#include <android/input.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
#include "editor/editor_settings.h"
|
||||
#endif
|
||||
|
||||
static JavaClassWrapper *java_class_wrapper = nullptr;
|
||||
static OS_Android *os_android = nullptr;
|
||||
static AndroidInputHandler *input_handler = nullptr;
|
||||
|
@ -449,6 +453,18 @@ JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *
|
|||
return env->NewStringUTF(ProjectSettings::get_singleton()->get(js).operator String().utf8().get_data());
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getEditorSetting(JNIEnv *env, jclass clazz, jstring p_setting_key) {
|
||||
String editor_setting = "";
|
||||
#ifdef TOOLS_ENABLED
|
||||
String godot_setting_key = jstring_to_string(p_setting_key, env);
|
||||
editor_setting = EDITOR_GET(godot_setting_key).operator String();
|
||||
#else
|
||||
WARN_PRINT("Access to the Editor Settings in only available on Editor builds");
|
||||
#endif
|
||||
|
||||
return env->NewStringUTF(editor_setting.utf8().get_data());
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *env, jclass clazz, jlong ID, jstring method, jobjectArray params) {
|
||||
Object *obj = ObjectDB::get_instance(ID);
|
||||
ERR_FAIL_NULL(obj);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue