Merge pull request #2214 from fewtarius/dev

Fixes pico-8.  Now supports roms/pico-8/aarch64 and roms/pico-8/x86_64 for compatibility with multi-arch sync.
This commit is contained in:
fewtarius 2023-10-17 10:28:38 -04:00 committed by GitHub
commit 084281162f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,8 @@
# Source predefined functions and variables
. /etc/profile
GAME_DIR="/storage/roms/pico-8/"
case ${HW_ARCH} in
aarch64)
STATIC_BIN="pico8_64"
@ -28,19 +30,23 @@ then
OPTIONS="${OPTIONS} -pixel_perfect 1"
fi
cp -f /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt /storage/roms/pico-8/sdl_controllers.txt
if [ -e "/storage/roms/pico-8/${STATIC_BIN}" ]
if [ -d "${GAME_DIR}/${HW_ARCH}" ]
then
jslisten set "-9 ${STATIC_BIN}"
/storage/roms/pico-8/${STATIC_BIN} -home -root_path /storage/roms/pico-8 -joystick 0 ${OPTIONS} "${CART}"
exit
LAUNCH_DIR="${GAME_DIR}/${HW_ARCH}"
fi
if [ -e "/storage/roms/pico-8/pico8_dyn" ] || [ ! "$?" = 0 ]
cp -f /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt ${LAUNCH_DIR}/sdl_controllers.txt
if [ -e "${LAUNCH_DIR}/pico8_dyn" ] || [ ! "$?" = 0 ]
then
jslisten set "-9 pico8_dyn"
/storage/roms/pico-8/pico8_dyn -home -root_path /storage/roms/pico-8 -joystick 0 ${OPTIONS} "${CART}"
${LAUNCH_DIR}/pico8_dyn -home -root_path ${GAME_DIR} -joystick 0 ${OPTIONS} "${CART}"
fi
if [ -e "${LAUNCH_DIR}/${STATIC_BIN}" ] || [ ! "$?" = 0 ]
then
jslisten set "-9 ${STATIC_BIN}"
${LAUNCH_DIR}/${STATIC_BIN} -home -root_path ${GAME_DIR} -joystick 0 ${OPTIONS} "${CART}"
exit
else
text_viewer -e -w -t "Missing Pico-8 binaries!" -m "Extract your purchased pico8 package into the pico-8 directory on your games partition."