Boot to last played game on startup

Is there any way to setup RA so when you start it it’ll always boot to the last game you played? I know it’s only a few clicks to get into your history and launch the game, but if someone is consistently playing the same game in short bursts, this would be so helpful.

1 Like

You could create a command line that parses the “content_history.lpl” file and passes the top content as a variable.

Any details on how this is possible - not sure how you would create a shortcut that does this? Would really love to figure this out!

1 Like

I’m no expert but I gave it a shot after I posted my suggestion. I didn’t succeed. :frowning_face:

With the Windows command line it will take a FOR loop with tokens and delims to extract the needed info and populate a variable.

This will need to be done twice… once to get the core path and once to get the rom path.

Then the variables can be used in the Retroarch command line.

I’m sure I could puzzle it out eventually but it might be easier if someone with more knowledge of DOS batch files chimes in.

This is probably more clumsy than it needs to be but as long as your rom path is on line 11 and core path on line 13, this will work.

@echo off

FOR /F skip^=^10^ delims^=^"^ tokens^=4  %%i in (content_history.lpl) do set "romvar=%%i"&goto nextline
:nextline

FOR /F skip^=^12^ delims^=^"^ tokens^=4  %%j in (content_history.lpl) do set "corevar=%%j"&goto nextline2
:nextline2

SET "romvar2=%romvar:\\=\%"
SET "corevar2=%corevar:\\=\%"

Retroarch.exe -L "%corevar2%" "%romvar2%"

Create a *.cmd (i.e. lastgame.cmd) in the Retroarch root with these contents and running it should boot the first game in the file.

You can load the “content_history.lpl” file in a line numbered text editor and verify the line numbers, changing them if you need to.

Thank you so much for making that!!!

1 Like