RetroDECK / RetroDECK

RetroDECK brings you an all-in-one sandboxed application to play your retro games (and even not-so-retro games) on Linux/SteamOS.
https://retrodeck.net
GNU General Public License v3.0
787 stars 36 forks source link

RPCS3 issue with game-shortcuts using .desktop files #585

Closed josefwells closed 9 months ago

josefwells commented 11 months ago

PS3 unable to run via "shortcut" method. Reproducible on PC and deck.

Install RetroDeck and follow: https://github.com/XargonWan/RetroDECK/wiki/Guide%3A-Playstation-3-%E2%80%90-RPCS3#method-1-game-shortcuts-desktop-files

Run configurator, right click on pre-installed "The PS3 Interface..." -> "Create Shortcut" -> "Create Desktop Shortcut".

Copy resulting "The PS3 Interface (XMB, or VSH).desktop from desktop to retrodeck/roms/ps3.

Open RetroDeck, -> PS3 -> "The PS3 Interface (XMB, or VSH)"

Error: Booting '/home//retrodeck/roms/ps3/The PS3 Interface (XMB, or VSH).desktop' failed! Reason: Invalid file or folder

/home/$USER/.var/app/net.retrodeck.retrodeck/config/emulationstation/.emulationstation/es_log.txt
Nov 30 12:47:23 Info:   Expanded emulator launch command:
Nov 30 12:47:23 Info:   /app/bin/rpcs3 --no-gui /home/<USER>/retrodeck/roms/ps3/The\ PS3\ Interface\ \(XMB,\ or\ VSH\).desktop

You can get these to boot from configurator->open emulator->rpcs3->right-click-Boot or

flatpak run --command=sh net.retrodeck.retrodeck
#(From .desktop file ROM's look slightly different with a %%RPCS3_GAMEID%%:GAMEID):
#Exec="/app/bin/rpcs3" --no-gui "%%RPCS3_VFS%%:dev_flash/vsh/module/vsh.self"
#remove duplicated %% for desktop formatting:
"/app/bin/rpcs3" --no-gui "%RPCS3_VFS%:dev_flash/vsh/module/vsh.self"

So emulationstation is somehow trying to run the .desktop file with rpcs3 instead of pulling out the Exec (or using gtk-launcher/kioclient, which I understand parses .desktop files)

josefwells commented 11 months ago

Debugging further I see:

Nov 30 13:34:16 Info:   Launching game "The PS3 Interface (XMB, or VSH)" from system "Sony PlayStation 3 (ps3)"...
Nov 30 13:34:16 Debug:  FileData::launchGame(): Using default emulator "RPCS3 Directory (Standalone)"
Nov 30 13:34:16 Debug:  FileData::findEmulatorPath(): Emulator binary found via systempath rule
Nov 30 13:34:16 Debug:  FileData::launchGame(): Emulator binary set to "/app/bin/rpcs3"
Nov 30 13:34:16 Debug:  Raw emulator launch command:
Nov 30 13:34:16 Debug:  %EMULATOR_RPCS3% --no-gui %ROM%
Nov 30 13:34:16 Info:   Expanded emulator launch command:
Nov 30 13:34:16 Info:   /app/bin/rpcs3 --no-gui /home/<USER>/retrodeck/roms/ps3/The\ PS3\ Interface\ \(XMB,\ or\ VSH\).desktop
Nov 30 13:34:45 Debug:  Platform::launchGameUnix():
Nov 30 13:34:45 Debug:  Output from launched game:
Debugger: 0
Failed to set RLIMIT_MEMLOCK size to 2 GiB. Try to update your system configuration.
Qt: Session management error: Could not open network socket
RPCS3: Booting '/home/<USER>/retrodeck/roms/ps3/The PS3 Interface (XMB, or VSH).desktop' failed!

Reason: Invalid file or folder
Qt: Session management error: Could not open network socket
Nov 30 13:34:45 Debug:  GamelistFileParser::updateGamelist(): Added/updated 1 entity in "/var/config/emulationstation/.emulationstation/gamelists/ps3/gamelist.xml"

From: https://gitlab.com/es-de/emulationstation-de/-/blob/master/es-app/src/FileData.cpp

I expect to see output from: line 1521: LOG(LogInfo) << "Parsing desktop file.... After "Info: Launching game..." (line 826, the start of launchGame()) After "Debug: FileData::launchGame(): Using default emulator ..." (line 875) Before "Debug: Raw emulator launch command:" (line 1626)

Seems my .desktop is not detected as a "shortcut" earlier.

josefwells commented 11 months ago

Thanks to some chatter in the Discord I found that the way to select the shortcut emulator is via metadata, not just the name of the file (*.desktop vs. directory-based).

Select the game, go to options and select the shortcut emulator. Save. Then start game. Alternatively, edit retrodeck/gamelists/ps3/gamelist.xml and add the xml tag:

RPCS3 Shortcut (Standalone)
XargonWan commented 11 months ago

TODO: move RPCS3 shortcut as default.

XargonWan commented 11 months ago

In: https://github.com/XargonWan/RetroDECK/commit/90994e459fa14f4d4299201a431825625fb86cd1

XargonWan commented 10 months ago

Related to: https://github.com/XargonWan/RetroDECK/issues/618

XargonWan commented 9 months ago

Done https://github.com/XargonWan/RetroDECK/commit/02bcf8e6d8606700e4f3e9d44cd7476268e40d45