-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsnes_config.sh
77 lines (67 loc) · 3.07 KB
/
snes_config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/sh
NONE='\033[00m'
RED='\033[01;31m'
GREEN='\033[01;32m'
YELLOW='\033[01;33m'
PURPLE='\033[01;35m'
CYAN='\033[01;36m'
WHITE='\033[01;37m'
BOLD='\033[1m'
UNDERLINE='\033[4m'
BLINK='\x1b[5m'
handheldModel=$(cat ~/dragoonDoriseTools/.device)
snesMode="CLASSIC"
snesConfigured="false"
FILE=~/dragoonDoriseTools/.snes87
if [ -f "$FILE" ]; then
snesMode="INTERNAL"
snesConfigured="true"
fi
FILE=~/dragoonDoriseTools/.snes43
if [ -f "$FILE" ]; then
snesMode="CLASSIC"
snesConfigured="true"
fi
echo "### SNES AR Selection " &>> ~/storage/shared/pegasus_installer_log.log
while true; do
snesMode=$(whiptail --title "Please choose your Super Nintendo Aspect Ratio" \
--radiolist "Move using your DPAD and select your options with the Y button. Press the A button to select." 10 80 4 \
"CLASSIC" "4:3 Aspect Ratio (Classic TV Resolution)" ON \
"INTERNAL" "8:7 Aspect Ratio (Real internal Resolution)" OFF \
3>&1 1<&2 2>&3)
case $snesMode in
[CLASSIC]* ) break;;
[INTERNAL]* ) break;;
* ) echo "Please choose";;
esac
done
if [[ $handheldModel == "RG552" ]]; then
echo "### SNES RG552 " &>> ~/storage/shared/pegasus_installer_log.log
if [[ $snesMode == "CLASSIC" ]]; then
rm ~/dragoonDoriseTools/.snes43 &>> ~/storage/shared/pegasus_installer_log.log
rm ~/dragoonDoriseTools/.snes87 &>> ~/storage/shared/pegasus_installer_log.log
touch ~/dragoonDoriseTools/.snes43 &>> ~/storage/shared/pegasus_installer_log.log
cp -r ~/dragoonDoriseTools/pegasus-android-metadata/internal/rg552/RetroArch/config/Snes9x/snes.cfg ~/storage/shared/RetroArch/config/Snes9x/snes.cfg &>> ~/storage/shared/pegasus_installer_log.log
else
rm ~/dragoonDoriseTools/.snes43 &>> ~/storage/shared/pegasus_installer_log.log
rm ~/dragoonDoriseTools/.snes87 &>> ~/storage/shared/pegasus_installer_log.log
touch ~/dragoonDoriseTools/.snes87 &>> ~/storage/shared/pegasus_installer_log.log
cp -r ~/dragoonDoriseTools/pegasus-android-metadata/internal/rg552/RetroArch/config/Snes9x/snes87.cfg ~/storage/shared/RetroArch/config/Snes9x/snes.cfg &>> ~/storage/shared/pegasus_installer_log.log
fi
else
if [[ $snesMode == "CLASSIC" ]]; then
rm ~/dragoonDoriseTools/.snes43 &>> ~/storage/shared/pegasus_installer_log.log
rm ~/dragoonDoriseTools/.snes87 &>> ~/storage/shared/pegasus_installer_log.log
touch ~/dragoonDoriseTools/.snes43 &>> ~/storage/shared/pegasus_installer_log.log
cp -r ~/dragoonDoriseTools/pegasus-android-metadata/internal/common/RetroArch/config/Snes9x/snes.cfg ~/storage/shared/RetroArch/config/Snes9x/snes.cfg &>> ~/storage/shared/pegasus_installer_log.log
else
rm ~/dragoonDoriseTools/.snes43 &>> ~/storage/shared/pegasus_installer_log.log
rm ~/dragoonDoriseTools/.snes87 &>> ~/storage/shared/pegasus_installer_log.log
touch ~/dragoonDoriseTools/.snes87 &>> ~/storage/shared/pegasus_installer_log.log
cp -r ~/dragoonDoriseTools/pegasus-android-metadata/internal/common/RetroArch/config/Snes9x/snes87.cfg ~/storage/shared/RetroArch/config/Snes9x/snes.cfg &>> ~/storage/shared/pegasus_installer_log.log
fi
fi
clear
echo ""
echo -ne "Snes configuration..."
echo -e "${GREEN}OK${NONE}"