-
Notifications
You must be signed in to change notification settings - Fork 0
/
VVVVVV.sh
36 lines (31 loc) · 952 Bytes
/
VVVVVV.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
#!/bin/bash
ESUDO="sudo"
if [ -f "/storage/.config/.OS_ARCH" ]; then
ESUDO=""
fi
if [[ -e "/dev/input/by-path/platform-ff300000.usb-usb-0:1.2:1.0-event-joystick" ]]; then
param_device="anbernic"
elif [[ -e "/dev/input/by-path/platform-odroidgo2-joypad-event-joystick" ]]; then
if [[ ! -z $(cat /etc/emulationstation/es_input.cfg | grep "190000004b4800000010000001010000") ]]; then
param_device="oga"
else
param_device="rk2020"
fi
elif [[ -e "/dev/input/by-path/platform-odroidgo3-joypad-event-joystick" ]]; then
param_device="ogs"
else
param_device="chi"
fi
if [ -f "/opt/system/Advanced/Switch to main SD for Roms.sh" ]; then
GAMEDIR="/roms2/ports/VVVVVV"
else
GAMEDIR="/roms/ports/VVVVVV"
fi
cd $GAMEDIR
rm -rf ~/.local/share/VVVVVV
ln -s /$GAMEDIR ~/.local/share/
$ESUDO ./oga_controls VVVVVV $param_device &
./VVVVVV
$ESUDO kill -9 $(pidof oga_controls)
$ESUDO systemctl restart oga_events &
printf "\033c" >> /dev/tty1