Adds Savestate support to retroarch-zip

This commit is contained in:
almostalive 2012-11-08 16:31:56 -06:00
parent 08cbefdeca
commit ff25a0cb23

View File

@ -66,8 +66,10 @@ fi
mv "${TMPDIR}/${FILENAME}" "${TMPROM}"
SAVENAME="`basename \"${COMP_FILE}\" ${EXTENSION}`"
SAVESTATE="`basename \"${COMP_FILE}\" ${EXTENSION}`"
DIRNAME="`dirname \"${COMP_FILE}\"`"
SAVENAME="${SAVENAME}.srm"
SAVESTATE="${SAVESTATE}.state"
EXE="`which retroarch`"
if [ -z "${EXE}" ]; then
@ -76,7 +78,8 @@ fi
echo "Temp ROM: ${TMPROM}"
echo "Savename: ${DIRNAME}/${SAVENAME}"
"${EXE}" "${TMPROM}" -s "${DIRNAME}/${SAVENAME}" "$@"
echo "Savestate: ${DIRNAME}/${SAVESTATE}"
"${EXE}" "${TMPROM}" -s "${DIRNAME}/${SAVENAME}" -S "${DIRNAME}/${SAVESTATE}" "$@"
rm "${TMPROM}"
rm -r "${TMPDIR}"