2022-09-04 21:43:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Copyright (C) 2021-present - Fewtarius
|
|
|
|
|
|
|
|
. /etc/profile
|
|
|
|
|
2023-10-13 10:48:24 +00:00
|
|
|
GAME=${1//[\\]/}
|
2023-09-30 00:12:44 +00:00
|
|
|
|
2023-06-12 21:23:01 +00:00
|
|
|
jslisten set "-9 pcsx2-qt"
|
|
|
|
|
2023-10-13 10:48:24 +00:00
|
|
|
FPS=$(get_setting show_fps ps2 "${GAME}")
|
|
|
|
|
2022-09-22 23:50:28 +00:00
|
|
|
if [ ! -d "/storage/.config/PCSX2" ]
|
|
|
|
then
|
|
|
|
cp -rf /usr/config/PCSX2 /storage/.config
|
|
|
|
fi
|
2023-10-12 21:42:03 +00:00
|
|
|
|
|
|
|
#Create PS2 bios folder
|
|
|
|
if [ ! -d "/storage/roms/bios/pcsx2/bios" ]
|
|
|
|
then
|
|
|
|
mkdir -p "/storage/roms/bios/pcsx2/bios"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#Create PS2 saves & savestates folders
|
|
|
|
if [ ! -d "/storage/roms/saves/ps2" ]
|
|
|
|
then
|
|
|
|
mkdir -p "/storage/roms/saves/ps2"
|
|
|
|
fi
|
|
|
|
if [ ! -d "/storage/roms/savestates/ps2" ]
|
|
|
|
then
|
|
|
|
mkdir -p "/storage/roms/savestates/ps2"
|
|
|
|
fi
|
|
|
|
|
2023-10-13 10:48:24 +00:00
|
|
|
for OSDPROPERTY in OsdShowSpeed OsdShowFPS OsdShowCPU OsdShowGPU OsdShowResolution OsdShowGSStats OsdShowIndicators
|
|
|
|
do
|
|
|
|
case ${FPS} in
|
|
|
|
true)
|
|
|
|
sed -i '/'${OSDPROPERTY}'/c\'${OSDPROPERTY}' = true' /storage/.config/PCSX2/inis/PCSX2.ini
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
sed -i '/'${OSDPROPERTY}'/c\'${OSDPROPERTY}' = false' /storage/.config/PCSX2/inis/PCSX2.ini
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
@APPIMAGE@ -fastboot -nogui -- "${GAME}"
|
2023-09-30 00:12:44 +00:00
|
|
|
|
2023-08-07 21:31:05 +00:00
|
|
|
#Workaround until we can learn why it doesn't exit cleanly when asked.
|
2023-10-13 10:48:24 +00:00
|
|
|
killall -9 pcsx2-qt
|