Autostart last played game
-
Hi guys,
You want to make sure that by turning on the bartop based on Reropie, without having to touch anything, does the last game used start automatically? After that, leaving the game, do you enter the ES menu as usual?Here my solution for game autostart.
- Record command used by ES menu:
at the end of file
/opt/retropie/supplementary/runcommand/runcommand.sh
before the line:
runcommand "$@"
insert these lines:
**echo "$0 $1 $2 $3 "$4""> "/home/pi/lastgame.sh"
echo "ok?" > "/home/pi/lastgameok"
chmod +x "/home/pi/lastgame.sh"
At the end of file there is the line**
runcommand "$@"
- start command recorded at boot.
at the end of file
/opt/retropie/configs/all/autostart.sh
Instead of the line
emulationstation
insert these lines:
export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
if [ -f /home/pi/lastgameok ]; then
rm /home/pi/lastgameok
/home/pi/lastgame.sh
echo "ok" > /home/pi/lastgameok
emulationstation
else
rm /home/pi/lastgame.sh
emulationstation
fiQuestions, comments and feedback all welcome.
Smsteves
- Record command used by ES menu:
-
I don't need this, but thanks for sharing with those who do.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.