You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Additional fixes and improvements to JavaClassWrapper
- Fix crashing bug when invoking class constructor with parameters - Add support for accessing class constants - Add support for Godot Callable arguments. A Godot Callable can be wrapped by a Java Runnable to allow Java logic to run arbitrary Godot lambdas - Automatically convert java.lang.CharSequence to Godot String as needed - Code cleanup
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
#include "api/java_class_wrapper.h"
|
||||
#include "api/jni_singleton.h"
|
||||
#include "jni_utils.h"
|
||||
#include "string_android.h"
|
||||
|
||||
#include "core/config/engine.h"
|
||||
#include "core/error/error_macros.h"
|
||||
@@ -136,5 +135,10 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeEmitS
|
||||
}
|
||||
|
||||
singleton->emit_signalp(StringName(signal_name), args, count);
|
||||
|
||||
// Manually invoke the destructor to decrease the reference counts for the variant arguments.
|
||||
for (int i = 0; i < count; i++) {
|
||||
variant_params[i].~Variant();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user