Skip to content

Add RetroArch as a frontend (#239)#240

Open
SineSwiper wants to merge 3 commits intoGemba:masterfrom
SineSwiper:add-retroarch-frontend
Open

Add RetroArch as a frontend (#239)#240
SineSwiper wants to merge 3 commits intoGemba:masterfrom
SineSwiper:add-retroarch-frontend

Conversation

@SineSwiper
Copy link

Here's the PR for issue 239.

@SineSwiper
Copy link
Author

SineSwiper commented Mar 21, 2026

Replying to this comment:

Any reason you did not file a PR?

Here ya go.

I am not sure if using the CSV file for a frontend, as this file is esp. for hinting scrapers with an API, but let me think about it.

I'm open to wherever you want the data. But, I felt like hardcoding it was wrong, especially since this CSV file was already serving a purpose of mapping platform names to other API IDs.

I am not sold to have RetroPie-Paths hardwired /opt/retropie/... as default. On Linux ~/.config/retroarch is a better choice (RetroPie symlinks those to /opt/retropie/...). macOS and Windows may need some research of the default folders.

I was mostly basing this off of other prior art (see grep -R '/opt/retropie' src), but this line also exists:

src/config.cpp
55:        {"XDG_CONFIG_HOME", QDir::homePath() % "/.config"},

AFAICT there is no evaluation of any retroarch.cfg (aso.) to identify possible path alterations in your contribution? (not an issue more a confirmation, as the user may provide altered paths to Skyscraper explicitly at least on a coarse grained level (cf. mediaFolder)).

Is this reading the RetroArch config files? No, mainly because I didn't see any sort of mechanism like that for the other frontends. Might be a good idea for media/ROM defaults. Though, I think it would deserve some sort of frontendConfigDir property in the Skyscraper config to override the directory to look for those.

But, there are overrides with the usual config.ini properties. Here's what I had in my retroarch section:

[retroarch]
gameListFolder="/home/pi/Arcade/retroarch/playlists"
mediaFolder="/home/pi/Arcade/retroarch/thumbnails"
unattend="true"
artworkXml="artwork-retroarch.xml"

I did have to run through a perl-pie script to change the ROM paths to /storage/emulated/0/ROMs/, but that's only because I'm running Skyscraper on my Retropie to transfer data to my AYN Thor.

The double trailing spaces are deliberately there (new line without paragraph space in between), maybe your IDE/editor removed them automagically. The single ones are save to remove.

Sorry, yeah, my IDE removes trailing whitespace. Are you referencing the Markdown edits? I thought Markdown conversions compressed any whitespace (newlines or space) down to a single space. (Which is sad for me, because I'm one of the few double-space-per-sentence holdouts left...)

For windows builds the JSON should contain \ instead of / for the "path": element in JSON

I'm just using entry.absoluteFilePath here. I can scan through and see if I'm joining dir/files in the wrong way, though.

Make sure to apply the clang formatter rules of the project before PR-ing.

Yep, I did. Ran through the CONTRIBUTING doc. Hence the initial feature request.

The negating test on the not supported media file MANUAL should test according to the comment above. ;-)

Okay, let me take a look at that one.

}

QString RetroArch::getWheelsFolder() {
return config->mediaFolder % "/Named_Logos";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just going to point out this "two media types with the same folder" issue as something I know is odd, just in case you think it needs to be changed.

// types
if (config.frontend == "retroarch") {
const QString oldSubPath = "/" % config.platform;
const QString newSubPath = "/" % frontend->getPlatformOutputName();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, yes, these are definitely *NIX path separators.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if there's anything to fix. AFAIK, Qt's file classes will keep forward slashes, even for Windows, eg: /C:/Roms/snes/game.zip. If there's any cross-platform compatibility to fix, it's likely at a lower-level, where QList<GameEntry> &gameEntries gets built.

* Fix MARQUEE entry in retroarch.h
* Add more negative tests to testSupportedMedia
* Remove unnecessary path check in frontendExtra read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant