libretro / libretro/RetroArch

Optimize browsing when using Load Content / File Browser

Open
#10,823 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature request file browser
Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

Description

Would it be possible to add a shortcut in the File Browser, that leads you to the path of the last rom you launched (as seen in my image down below)?

RA_last_used_content_path

Theoretically it should be the path in the top rom of the content_history.lpl which is used in the Histroy Tab.

Alternatively, allow the user go back to the directory they launched the last rom from, when they hit "close content", pretty much like when you exit a game from the playlist, you automatically get back to the same playlist.

I prefer the latter but wouldn't mind the shortcut either. Maybe both ideas could be implemented?

Not everyone uses playlists. I have a pretty deep file structure for sorting my roms, e.g. lets say my file structure is like this:
<start_dir>\rom collections\everdrive\megadrive\4 Hacks\Hacks A-Z\Streets of Rage Series
and I wanted to try one rom after another in that last subdirectory, I'd have to
navigate through 5 or 6 folders before I reach the roms. That's pretty tiresome and no fun.

Every Emulator on Windows remembers the file path the last rom was launched from, Snes9x did this on my Win98 computer back in 1999, why can't RA remember the path?

Please make this happen devs!

How the Last Used Content Directory short cut could be implemented

In the file browser there are already 3 short cuts, (Start Directory, Downloads, Playlists), which lead to a given path that is hardcoded and stored in the retroarch.cfg.

For the Last Used Content Directory short cut RA would need a dynamic path that is overwritten each time you launch a rom. As of now, upon launching a rom, the information for the rom, including the file path is being stored in content_history.lpl. My suggestion would be, to create an extra new temporary file in the same step as the content_histroy.lpl is being updated/created. This file could be named last_content_dir.tmp, and hold the path to the last lanuched rom. The Short Cut would read from this temp file instead of reading from the retroarch.cfg file. Upon quitting or restarting RA this file should be removed. If the file does not exist, RA should go to the Start Directory path when selecting the Last Used Content Directory short cut.

Alternatively, write the last used content dir path to the retroarch.cfg file. I'm not sure if this is parctial to edit the cfg file each time you launch a rom, probably not, hence I suggest a temp file...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the File Browser shortcut implementation and the code that updates content_history.lpl when content is launched. Compare the existing Start Directory, Downloads, and Playlists shortcuts with the requested last-content-directory behavior. Done means the chosen navigation behavior works after launching and closing content, including the stated fallback when no last directory exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.