mirror of
https://github.com/dragoonDorise/EmuDeck.git
synced 2025-05-06 00:12:49 +00:00
Merge branch 'dev' of https://github.com/dragoonDorise/EmuDeck into dev
This commit is contained in:
commit
5643375a61
@ -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)
|
# 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"
|
# 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
|
# construct launch args and run
|
||||||
launch_args=("-g" "$launchParam")
|
launch_args=("-g" "$launchParam")
|
||||||
echo "Launching: ${exe[*]} ${launch_args[*]}"
|
echo "Launching: ${exe[*]} ${launch_args[*]}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user