Fix_shadps4.sh_ES-DE_shortcut (#1441)

This commit is contained in:
Matako 2025-04-10 15:25:32 +07:00 committed by GitHub
parent 9fe754b8b5
commit 69648937a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,8 +44,13 @@ if [[ $fileExtension == "desktop" ]]; then
# this removes everything in Exec= line before first " or ' (quotes), keeps everything after that (including the quotes)
# given example above, result will be: "/run/media/mmcblk0p1/Emulation/storage/shadps4/games/CUSA01369/eboot.bin"
launchParam=$(echo "Exec=$shadps4DesktopExec" | sed "s|^\(Exec=\)[^\"\']*\([\"\']\)|\2|")
launchParam=$(echo "$shadps4DesktopExec" | grep -oP '"\K[^"]+(?=")')
# fallback : si pas trouvé avec guillemets, prend dernier mot
if [[ -z "$launchParam" ]]; then
launchParam=$(echo "$shadps4DesktopExec" | awk '{print $NF}')
fi
# construct launch args and run
launch_args=("-g" "$launchParam")
echo "Launching: ${exe[*]} ${launch_args[*]}"