Skip to content

Commit

Permalink
Fix bugs in ScummVM launch script
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrueden committed Nov 22, 2021
1 parent 04a7498 commit 7b6218d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scriptmodules/emulators/scummvm.sh
Expand Up @@ -80,10 +80,16 @@ function configure_scummvm() {
#!/bin/bash
game="\$1"
pushd "$romdir/scummvm" >/dev/null
# Read game ID from .svm file, if present.
[[ -f "\$game.svm" ]] && game=$(cat "\$game.svm")
$md_inst/bin/scummvm --fullscreen --joystick=0 --extrapath="$md_inst/extra" "\$game"
while read id desc; do
echo "\$desc" > "$romdir/scummvm/\$id.svm"
done < <($md_inst/bin/scummvm --list-targets | tail -n +3)
# Write .svm files.
while read id title; do
echo "\$id" > "/home/pi/RetroPie/roms/scummvm/\$title.svm"
done < <(/opt/retropie/emulators/scummvm/bin/scummvm --list-targets | tail -n +3 | tr '/' ' ')
popd >/dev/null
_EOF_
chown $user:$user "$romdir/scummvm/+Start $name.sh"
Expand Down

0 comments on commit 7b6218d

Please sign in to comment.