From b2c0a687f1cd8328556d9e0f36f21dcba05feb1a Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Wed, 13 Mar 2019 23:51:55 +1100 Subject: Restructuring glue code to make it easier to extend --- platform/android/java/src/org/godotengine/godot/Godot.java | 3 +++ platform/android/java/src/org/godotengine/godot/GodotLib.java | 1 + 2 files changed, 4 insertions(+) (limited to 'platform/android/java/src/org/godotengine') diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java index e42099ba0b..48fd076d31 100644 --- a/platform/android/java/src/org/godotengine/godot/Godot.java +++ b/platform/android/java/src/org/godotengine/godot/Godot.java @@ -606,6 +606,9 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC for (int i = 0; i < singleton_count; i++) { singletons[i].onMainDestroy(); } + + GodotLib.ondestroy(this); + super.onDestroy(); } diff --git a/platform/android/java/src/org/godotengine/godot/GodotLib.java b/platform/android/java/src/org/godotengine/godot/GodotLib.java index 6e6b398a5d..31ca9a8500 100644 --- a/platform/android/java/src/org/godotengine/godot/GodotLib.java +++ b/platform/android/java/src/org/godotengine/godot/GodotLib.java @@ -46,6 +46,7 @@ public class GodotLib { */ public static native void initialize(Godot p_instance, Object p_asset_manager, boolean use_apk_expansion); + public static native void ondestroy(Godot p_instance); public static native void setup(String[] p_cmdline); public static native void resize(int width, int height); public static native void newcontext(boolean p_32_bits); -- cgit v1.2.3