distribution/packages/emulators/standalone/flycast-sa/scripts/start_flycastsa.sh

39 lines
935 B
Bash
Raw Normal View History

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
2023-03-30 23:45:49 +00:00
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
. /etc/profile
2023-03-30 23:45:49 +00:00
#Check if flycast exists in .config
if [ ! -d "/storage/.config/flycast" ]; then
mkdir -p "/storage/.config/flycast"
cp -r "/usr/config/flycast" "/storage/.config/"
fi
2023-03-30 23:45:49 +00:00
#Make flycast bios folder
if [ ! -d "/storage/roms/bios/dc" ]; then
mkdir -p "/storage/roms/bios/dc"
fi
2023-04-25 18:22:59 +00:00
#Set the cores to use
CORES=$(get_setting "cores" "${PLATFORM}" "${ROMNAME##*/}")
if [ "${CORES}" = "little" ]
then
EMUPERF="${SLOW_CORES}"
elif [ "${CORES}" = "big" ]
then
EMUPERF="${FAST_CORES}"
else
### All..
unset EMUPERF
fi
2023-03-30 23:45:49 +00:00
#Link .config/flycast to .local
rm -rf "/storage/.local/share/flycast"
ln -sf "/storage/.config/flycast" "/storage/.local/share/flycast"
ln -sf "/storage/roms/bios/dc" "/storage/.local/share/flycast"
2023-03-30 23:45:49 +00:00
#Run flycast emulator
2023-04-25 18:22:59 +00:00
${EMUPERF} /usr/bin/flycast "${1}"