Merge pull request #453 from fewtarius/dev

Fix pico-8 to load arm or x86_64 binary.
This commit is contained in:
fewtarius 2022-09-04 15:08:30 -04:00 committed by GitHub
commit 5be60ef081
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,18 +13,26 @@ else
OPTIONS="-splore"
fi
if [ "${HW_ARCH}" = "aarch64" ]
then
STATIC_BIN="pico8_64"
elif [ "${HW_ARCH}" = "x86_64" ]
then
STATIC_BIN="pico8"
fi
cp -f /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt /storage/roms/pico-8/sdl_controllers.txt
if [ -e "/storage/roms/pico-8/pico8_64" ]
if [ -e "/storage/roms/pico-8/${STATIC_BIN}" ]
then
jslisten set "pico8_64"
/storage/roms/pico-8/pico8_64 -home -root_path /storage/roms/pico-8 -joystick 0 ${OPTIONS} "${CART}"
elif [ -e "/storage/roms/pico-8/pico8_dyn" ] && [ ! -e "/storage/roms/pico-8/pico8_64" ]
jslisten set "${STATIC_BIN}"
/storage/roms/pico-8/${STATIC_BIN} -home -root_path /storage/roms/pico-8 -joystick 0 ${OPTIONS} "${CART}"
elif [ -e "/storage/roms/pico-8/pico8_dyn" ] && [ ! -e "/storage/roms/pico-8/${STATIC_BIN}" ]
then
jslisten set "pico8_dyn"
/storage/roms/pico-8/pico8_dyn -home -root_path /storage/roms/pico-8 -joystick 0 ${OPTIONS} "${CART}"
else
text_viewer -e -w -t "Missing Pico-8 binaries!" -m "Extract your purchased pico8_64 and pico8.dat and place them in the pico-8 directory on your games partition."
text_viewer -e -w -t "Missing Pico-8 binaries!" -m "Extract your purchased pico8 and pico8.dat and place them in the pico-8 directory on your games partition."
fi
ret_error=$?