From 84bb80dc1c04f27b3457eda3e50882e06548355c Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Tue, 27 Jun 2017 20:06:02 +0300 Subject: [PATCH] Removed non-working restart code --- src/openttd.cpp | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/src/openttd.cpp b/src/openttd.cpp index 711a83f2f2..95a899ca18 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -925,40 +925,6 @@ exit_normal: if (_restart_game) { #ifdef __ANDROID__ // This makes OpenTTD reset all it's settings for some reason, because the process is not killed and shared libraries are not unloaded. - //SDL_ANDROID_RestartMyself("restart-settings"); - /* - pid_t parent = getpid(); - pid_t pid = fork(); - if (pid == -1) return ret; - if (pid > 0) { - usleep(300 * 1000); - exit(0); - } else { - setsid(); - close(0); - close(1); - close(2); - execlp("/system/bin/sh", "/system/bin/sh", "-c", "sleep 2 ; am start --user -2 -n org.openttd.sdl/.MainActivity /dev/null 2>&1"); - exit(0); - } - */ - DEBUG(misc, 0, "============ Restarting OpenTTD"); - class restart - { - public: - static void run(void *) - { - const char *cmd = "$APPDIR/setsid /system/bin/sh -c 'echo Sleeping ; sleep 3 ; am start --user -3 -n org.openttd.sdl/.MainActivity' >$DATADIR/restart1.log 2>&1