Skip to content

Commit 7b6218d

Browse files
committed
Fix bugs in ScummVM launch script
As discussed at: https://retropie.org.uk/forum/topic/29349
1 parent 04a7498 commit 7b6218d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scriptmodules/emulators/scummvm.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,16 @@ function configure_scummvm() {
8080
#!/bin/bash
8181
game="\$1"
8282
pushd "$romdir/scummvm" >/dev/null
83+
84+
# Read game ID from .svm file, if present.
85+
[[ -f "\$game.svm" ]] && game=$(cat "\$game.svm")
86+
8387
$md_inst/bin/scummvm --fullscreen --joystick=0 --extrapath="$md_inst/extra" "\$game"
84-
while read id desc; do
85-
echo "\$desc" > "$romdir/scummvm/\$id.svm"
86-
done < <($md_inst/bin/scummvm --list-targets | tail -n +3)
88+
89+
# Write .svm files.
90+
while read id title; do
91+
echo "\$id" > "/home/pi/RetroPie/roms/scummvm/\$title.svm"
92+
done < <(/opt/retropie/emulators/scummvm/bin/scummvm --list-targets | tail -n +3 | tr '/' ' ')
8793
popd >/dev/null
8894
_EOF_
8995
chown $user:$user "$romdir/scummvm/+Start $name.sh"

0 commit comments

Comments
 (0)