Skip to content

Commit

Permalink
Merge pull request #1059 from t0b10-r3tr0/rtr_control_issue_bind_dir_…
Browse files Browse the repository at this point in the history
…patch

Ready to Runs with control issues: Replace symbolic links with bind mounts.
  • Loading branch information
Cebion authored Dec 19, 2024
2 parents 297f336 + 883033d commit 7a820e6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 20 deletions.
8 changes: 3 additions & 5 deletions ports/abuse/Abuse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

GAMEDIR="/$directory/ports/Abuse"
> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1

Expand Down Expand Up @@ -56,12 +54,12 @@ if [ -f "/boot/rk3326-rg351v-linux.dtb" ] || [ $(cat "/storage/.config/.OS_ARCH"
sed -i '/ctr_left_stick_aim\=0/s//ctr_left_stick_aim\=1/' $GAMEDIR/user/config.txt
fi

$ESUDO rm -rf ~/.abuse
ln -sfv $GAMEDIR/conf/.abuse ~/
bind_directories ~/.abuse $GAMEDIR/conf/.abuse

$ESUDO chmod 666 /dev/uinput
$GPTOKEYB "abuse" -c "$GAMEDIR/$GPTOKEYB_CONFIG" &
./abuse
$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty1

6 changes: 3 additions & 3 deletions ports/blobwars/Blobwars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

Expand All @@ -22,8 +22,7 @@ GAMEDIR=/$directory/ports/blobwars

cd $GAMEDIR

$ESUDO rm -rf ~/.parallelrealities/blobwars
ln -sfv /$directory/ports/blobwars/conf/.parallelrealities/blobwars ~/
bind_directories ~/.parallelrealities/blobwars /$directory/ports/blobwars/conf/.parallelrealities/blobwars

export LD_LIBRARY_PATH="$GAMEDIR/libs.${DEVICE_ARCH}:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
Expand All @@ -35,3 +34,4 @@ $ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0


6 changes: 3 additions & 3 deletions ports/cave.story-evo/Cave Story-evo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

$ESUDO chmod 666 /dev/tty0
Expand Down Expand Up @@ -49,8 +49,7 @@ if [ ! -f "$GAMEDIR/conf/nxengine/settings.dat" ]; then
rm -f "$GAMEDIR/conf/nxengine/settings.dat.*"
fi

$ESUDO rm -rf ~/.local/share/nxengine
$ESUDO ln -s $GAMEDIR/conf/nxengine ~/.local/share/
bind_directories ~/.local/share/nxengine $GAMEDIR/conf/nxengine

export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
Expand All @@ -62,3 +61,4 @@ $GPTOKEYB "nxengine-evo" -c nxengine-evo.gptk &
$ESUDO kill -9 $(pidof gptokeyb) &
printf "\033c" >> /dev/tty1


7 changes: 2 additions & 5 deletions ports/penguincommand/Penguin Command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt

[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls
Expand All @@ -32,8 +30,7 @@ export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
export XDG_DATA_HOME="$CONFDIR"
export TEXTINPUTINTERACTIVE="Y"

$ESUDO rm -rf ~/.penguin-command
ln -sfv $GAMEDIR/conf/.penguin-command ~/
bind_directories ~/.penguin-command $GAMEDIR/conf/.penguin-command

cd $GAMEDIR

Expand All @@ -44,4 +41,4 @@ $GPTOKEYB "$BINARY" -c ./$BINARY.gptk &

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
printf "\033c" > /dev/tty0
6 changes: 2 additions & 4 deletions ports/rockdodger/Rockdodger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ else
fi

source $controlfolder/control.txt

[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls
Expand All @@ -32,13 +31,12 @@ export XDG_DATA_HOME="$CONFDIR"
export TEXTINPUTINTERACTIVE="Y"

#bind_directories not compatible with single files
$ESUDO rm -rf ~/.rockdodger_high
ln -sfv $GAMEDIR/conf/.rockdodger_high ~/
bind_files ~/.rockdodger_high $GAMEDIR/conf/.rockdodger_high

cd $GAMEDIR

$GPTOKEYB2 "$BINARY" -c ./$BINARY.gptk &
pm_platform_helper "$GAMEDIR/$BINARY"
./$BINARY -k -f

pm_finish
pm_finish

0 comments on commit 7a820e6

Please sign in to comment.