RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Autostart last played game

    Scheduled Pinned Locked Moved General Discussion and Gaming
    autostartrom gamelastplayed
    2 Posts 2 Posters 543 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      smsteves
      last edited by smsteves

      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.

      1. 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 "$@"

      1. 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
      fi

      Questions, comments and feedback all welcome.

      Smsteves

      ClydeC 1 Reply Last reply Reply Quote 2
      • ClydeC
        Clyde @smsteves
        last edited by

        I don't need this, but thanks for sharing with those who do.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        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.