Skip to content

Commit 252eba8

Browse files
committed
rename instant_play file before resuming a game
Signed-off-by: Michel-FK <[email protected]>
1 parent 902df88 commit 252eba8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

FunKey/board/funkey/rootfs-overlay/usr/local/sbin/start_launcher

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
LOCK_FILE="/var/lock/launcher.lock"
77
INSTANT_PLAY_FILE="/mnt/instant_play"
8+
RESUME_PLAY_FILE="/mnt/resume_play"
89
PREVENT_LAUNCHER_FILE="/mnt/prevent_launcher"
910
REBOOTING_FILE="/run/rebooting"
1011

@@ -22,8 +23,10 @@ cp "/usr/games/lynxboot.img" "/usr/games/mednafen-09x.cfg" "${MEDNAFEN_HOME}/"
2223
# Launch Previous Game if any
2324
if [ -f "${INSTANT_PLAY_FILE}" ]; then
2425
echo "Found Instant Play file, restarting previous game with command: "$(head -n 1 "${INSTANT_PLAY_FILE}")
25-
source "${INSTANT_PLAY_FILE}"
26-
rm -f "${INSTANT_PLAY_FILE}"
26+
rm -f "${RESUME_PLAY_FILE}"
27+
mv "${INSTANT_PLAY_FILE}" "${RESUME_PLAY_FILE}"
28+
source "${RESUME_PLAY_FILE}"
29+
rm -f "${RESUME_PLAY_FILE}"
2730
termfix_all
2831
fi
2932

0 commit comments

Comments
 (0)