rename instant_play file before resuming a game
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
parent
902df88622
commit
252eba806b
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
LOCK_FILE="/var/lock/launcher.lock"
|
LOCK_FILE="/var/lock/launcher.lock"
|
||||||
INSTANT_PLAY_FILE="/mnt/instant_play"
|
INSTANT_PLAY_FILE="/mnt/instant_play"
|
||||||
|
RESUME_PLAY_FILE="/mnt/resume_play"
|
||||||
PREVENT_LAUNCHER_FILE="/mnt/prevent_launcher"
|
PREVENT_LAUNCHER_FILE="/mnt/prevent_launcher"
|
||||||
REBOOTING_FILE="/run/rebooting"
|
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
|
# Launch Previous Game if any
|
||||||
if [ -f "${INSTANT_PLAY_FILE}" ]; then
|
if [ -f "${INSTANT_PLAY_FILE}" ]; then
|
||||||
echo "Found Instant Play file, restarting previous game with command: "$(head -n 1 "${INSTANT_PLAY_FILE}")
|
echo "Found Instant Play file, restarting previous game with command: "$(head -n 1 "${INSTANT_PLAY_FILE}")
|
||||||
source "${INSTANT_PLAY_FILE}"
|
rm -f "${RESUME_PLAY_FILE}"
|
||||||
rm -f "${INSTANT_PLAY_FILE}"
|
mv "${INSTANT_PLAY_FILE}" "${RESUME_PLAY_FILE}"
|
||||||
|
source "${RESUME_PLAY_FILE}"
|
||||||
|
rm -f "${RESUME_PLAY_FILE}"
|
||||||
termfix_all
|
termfix_all
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue