You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
Fix 'save & restart' logic for the Android Editor
This commit is contained in:
@@ -2488,6 +2488,9 @@ void Main::cleanup(bool p_force) {
|
||||
|
||||
OS::get_singleton()->delete_main_loop();
|
||||
|
||||
// Storing it for use when restarting as it's being cleared right below.
|
||||
const String execpath = OS::get_singleton()->get_executable_path();
|
||||
|
||||
OS::get_singleton()->_cmdline.clear();
|
||||
OS::get_singleton()->_execpath = "";
|
||||
OS::get_singleton()->_local_clipboard = "";
|
||||
@@ -2558,10 +2561,9 @@ void Main::cleanup(bool p_force) {
|
||||
|
||||
if (OS::get_singleton()->is_restart_on_exit_set()) {
|
||||
//attempt to restart with arguments
|
||||
String exec = OS::get_singleton()->get_executable_path();
|
||||
List<String> args = OS::get_singleton()->get_restart_on_exit_arguments();
|
||||
OS::ProcessID pid = 0;
|
||||
OS::get_singleton()->execute(exec, args, false, &pid);
|
||||
OS::get_singleton()->execute(execpath, args, false, &pid);
|
||||
OS::get_singleton()->set_restart_on_exit(false, List<String>()); //clear list (uses memory)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user