From 252eba806b8a518484b590872c8ce43b92afdc38 Mon Sep 17 00:00:00 2001 From: Michel-FK Date: Mon, 18 Jan 2021 17:30:37 +0100 Subject: [PATCH] rename instant_play file before resuming a game Signed-off-by: Michel-FK --- .../funkey/rootfs-overlay/usr/local/sbin/start_launcher | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/start_launcher b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/start_launcher index 1c10d96..d7158d1 100755 --- a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/start_launcher +++ b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/start_launcher @@ -5,6 +5,7 @@ LOCK_FILE="/var/lock/launcher.lock" INSTANT_PLAY_FILE="/mnt/instant_play" +RESUME_PLAY_FILE="/mnt/resume_play" PREVENT_LAUNCHER_FILE="/mnt/prevent_launcher" REBOOTING_FILE="/run/rebooting" @@ -22,8 +23,10 @@ cp "/usr/games/lynxboot.img" "/usr/games/mednafen-09x.cfg" "${MEDNAFEN_HOME}/" # Launch Previous Game if any if [ -f "${INSTANT_PLAY_FILE}" ]; then echo "Found Instant Play file, restarting previous game with command: "$(head -n 1 "${INSTANT_PLAY_FILE}") - source "${INSTANT_PLAY_FILE}" - rm -f "${INSTANT_PLAY_FILE}" + rm -f "${RESUME_PLAY_FILE}" + mv "${INSTANT_PLAY_FILE}" "${RESUME_PLAY_FILE}" + source "${RESUME_PLAY_FILE}" + rm -f "${RESUME_PLAY_FILE}" termfix_all fi