mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Android: Include Joysticks/Gamepads which are available on app start.
This commit is contained in:
parent
b71254a861
commit
6e46701e64
5 changed files with 61 additions and 24 deletions
|
@ -59,6 +59,7 @@ GodotJavaWrapper::GodotJavaWrapper(JNIEnv *p_env, jobject p_godot_instance) {
|
|||
_get_clipboard = p_env->GetMethodID(cls, "getClipboard", "()Ljava/lang/String;");
|
||||
_set_clipboard = p_env->GetMethodID(cls, "setClipboard", "(Ljava/lang/String;)V");
|
||||
_request_permission = p_env->GetMethodID(cls, "requestPermission", "(Ljava/lang/String;)Z");
|
||||
_init_input_devices = p_env->GetMethodID(cls, "initInputDevices", "()V");
|
||||
}
|
||||
|
||||
GodotJavaWrapper::~GodotJavaWrapper() {
|
||||
|
@ -183,3 +184,10 @@ bool GodotJavaWrapper::request_permission(const String &p_name) {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void GodotJavaWrapper::init_input_devices() {
|
||||
if (_init_input_devices) {
|
||||
JNIEnv *env = ThreadAndroid::get_env();
|
||||
env->CallVoidMethod(godot_instance, _init_input_devices);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue