1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Provide a delegate implementation for the killProcess logic on Android

The implementation forwards the kill request to the Godot host for handling. If the Godot host is unable to handle the request, it falls back to the `OS_Unix::kill(...)` implementation.
This commit is contained in:
Fredia Huya-Kouadio
2023-01-26 02:55:47 -08:00
parent 71654485b8
commit 48a55ffad3
8 changed files with 129 additions and 47 deletions

View File

@@ -716,9 +716,19 @@ Error OS_Android::execute(const String &p_path, const List<String> &p_arguments,
}
Error OS_Android::create_instance(const List<String> &p_arguments, ProcessID *r_child_id) {
godot_java->create_new_godot_instance(p_arguments);
int instance_id = godot_java->create_new_godot_instance(p_arguments);
if (r_child_id) {
*r_child_id = instance_id;
}
return OK;
}
Error OS_Android::kill(const ProcessID &p_pid) {
if (godot_java->force_quit(nullptr, p_pid)) {
return OK;
}
return OS_Unix::kill(p_pid);
}
OS_Android::~OS_Android() {
}