Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retroarch improvements (part 2) #170

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions src/importer/sources/retroarch_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ def __init__(self) -> None:
invalid_subtitle=Location.CONFIG_INVALID_SUBTITLE,
)
)
# TODO enable when we get the Steam RetroArch games work
# self.add_steam_location_candidate()
self.add_steam_location_candidate()

def add_steam_location_candidate(self) -> None:
"""Add the Steam RetroAcrh location to the config candidates"""
Expand Down Expand Up @@ -236,13 +235,12 @@ def make_executable(self, core_path: Path, rom_path: Path) -> str:

# Steam RetroArch
# (Must check before Flatpak, because Steam itself can be installed as one)
# TODO enable when we get Steam RetroArch executable to work
# if self.locations.config.root.parent.parent.name == "steamapps":
# # steam://run exepects args to be url-encoded and separated by spaces.
# args = map(lambda s: url_quote(str(s), safe=""), args)
# args_str = " ".join(args)
# uri = f"steam://run/1118310//{args_str}/"
# return f"xdg-open {shell_quote(uri)}"
if self.locations.config.root.parent.parent.name == "steamapps":
# steam://run exepects args to be url-encoded and separated by spaces.
args = map(lambda s: url_quote(str(s), safe=""), args)
args_str = " ".join(args)
uri = f"steam://run/1118310//{args_str}/"
return f"xdg-open {shell_quote(uri)}"

# Flatpak RetroArch
args = map(lambda s: shell_quote(str(s)), args)
Expand Down