mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #99694 from dsnopek/android-os-create-instance-return-value
Android: `OS.create_instance()` should return `-1` on failure
This commit is contained in:
commit
150c69c0f2
4 changed files with 6 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -474,7 +474,7 @@ public class GodotFragment extends Fragment implements IDownloaderClient, GodotH
|
|||
if (parentHost != null) {
|
||||
return parentHost.onNewGodotInstanceRequested(args);
|
||||
}
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue