mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 11:01:17 +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:
parent
71654485b8
commit
48a55ffad3
8 changed files with 129 additions and 47 deletions
|
|
@ -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() {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue