Homepage Forums RetroPie Project Everything else related to the RetroPie Project Code help: exit game from command line

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #118453
    Scott Nath
    Participant

    Hi all

    I am creating a Nodejs app that triggers RetroPie to start Arcade Roms (mame-mame4all) from an app loaded in a browser on a different device. I’m using it to trigger game changes from an iPad or other connected device. (I’ll be creating an instructable when it’s shiny)

    Where I’m stuck

    When I start a second (or third) game, the currently-playing game keeps running and then the new game opens on top of the running game.

    They both run at the same time.

    What I’m trying to figure out is…

    What would I run on the command line to exit a game?

    How I run games now

    You can see the whole file here: github.com/scottnath/gamestation/blob/master/index.js

    But the relevant section is this:

    
        function gameKicker(gamefilename){
    
        //  // NEED TO EXIT GAME FIRST
        //  // BONUS ROUND: EXIT TO NODE APP!
          exec('/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ mame-mame4all ' + gamefilename + '.zip', function(error, stdout, stderr) {
            if (!error) {
              console.log('// things worked!');
            } else {
              console.log('// things failed :(');
            }
          });
        }
    

    Anybody out there know some command line tricks and could help me?

    thanks,
    Scott

Viewing 1 post (of 1 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.