summaryrefslogtreecommitdiffstats
path: root/platform/android/java/lib
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-11-27 10:47:30 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-11-27 10:47:30 -0600
commit150c69c0f24adebb92887743c1a6bb3505003e25 (patch)
treefcbebbb296514d7b67b4ab62df2fb3de955766f1 /platform/android/java/lib
parented01f5f2aa8e5a4c7103417f78259c5c9d9471ff (diff)
parent38e0532ffa43a8302a32d683ec7610b21ec0f4a1 (diff)
downloadredot-engine-150c69c0f24adebb92887743c1a6bb3505003e25.tar.gz
Merge pull request #99694 from dsnopek/android-os-create-instance-return-value
Android: `OS.create_instance()` should return `-1` on failure
Diffstat (limited to 'platform/android/java/lib')
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/Godot.kt2
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotFragment.java2
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotHost.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.kt b/platform/android/java/lib/src/org/godotengine/godot/Godot.kt
index 3ad8e6bc9e..f82b44c544 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/Godot.kt
+++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.kt
@@ -1123,7 +1123,7 @@ class Godot(private val context: Context) {
@Keep
private fun createNewGodotInstance(args: Array<String>): Int {
- return primaryHost?.onNewGodotInstanceRequested(args) ?: 0
+ return primaryHost?.onNewGodotInstanceRequested(args) ?: -1
}
@Keep
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotFragment.java b/platform/android/java/lib/src/org/godotengine/godot/GodotFragment.java
index d60595c0bb..7cfe3ef3e8 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotFragment.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotFragment.java
@@ -474,7 +474,7 @@ public class GodotFragment extends Fragment implements IDownloaderClient, GodotH
if (parentHost != null) {
return parentHost.onNewGodotInstanceRequested(args);
}
- return 0;
+ return -1;
}
@Override
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java b/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java
index 344b73f799..60d1f01b21 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java
@@ -92,7 +92,7 @@ public interface GodotHost {
* @return the id of the new instance. See {@code onGodotForceQuit}
*/
default int onNewGodotInstanceRequested(String[] args) {
- return 0;
+ return -1;
}
/**