From 164293e09f38e98865966888024a2a9b803a5f65 Mon Sep 17 00:00:00 2001 From: t0b10 Date: Sun, 15 Dec 2024 02:35:30 -0700 Subject: [PATCH] Add bind mount support. --- ports/descent/Descent.sh | 5 +++-- ports/descent2/Descent 2.sh | 5 +++-- ports/descent3/Descent 3.sh | 9 ++++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ports/descent/Descent.sh b/ports/descent/Descent.sh index b1a05e9197..f8ddbceb85 100644 --- a/ports/descent/Descent.sh +++ b/ports/descent/Descent.sh @@ -14,6 +14,7 @@ fi source $controlfolder/control.txt [ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt" + get_controls # Variables @@ -30,8 +31,7 @@ rm -rf "$GAMEDIR/config/gamelog.txt" $ESUDO chmod +x -R $GAMEDIR/* # Set config dir -$ESUDO rm -rf ~/.$GAME -ln -sfv $GAMEDIR/config ~/.$GAME +bind_directories ~/.$GAME $GAMEDIR/config # Exports export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH" @@ -90,3 +90,4 @@ fi # Cleanup pm_finish + diff --git a/ports/descent2/Descent 2.sh b/ports/descent2/Descent 2.sh index 5e3fec5dda..b87d28c1fa 100644 --- a/ports/descent2/Descent 2.sh +++ b/ports/descent2/Descent 2.sh @@ -14,6 +14,7 @@ fi source $controlfolder/control.txt [ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt" + get_controls # Variables @@ -30,8 +31,7 @@ rm -rf "$GAMEDIR/config/gamelog.txt" $ESUDO chmod +x -R $GAMEDIR/* # Set config dir -$ESUDO rm -rf ~/.$GAME -ln -sfv $GAMEDIR/config ~/.$GAME +bind_directories ~/.$GAME $GAMEDIR/config # Exports export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH" @@ -90,3 +90,4 @@ fi # Cleanup pm_finish + diff --git a/ports/descent3/Descent 3.sh b/ports/descent3/Descent 3.sh index 88697bd765..58c2e17426 100644 --- a/ports/descent3/Descent 3.sh +++ b/ports/descent3/Descent 3.sh @@ -12,8 +12,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 # Variables - Set DEBUGMODE to 1 to use the Debug build @@ -39,8 +39,7 @@ $ESUDO chmod 777 "$GAMEDIR/game" echo "Loading, please wait... (might take a while!)" > /dev/tty0 # Create config dir -rm -rf "$XDG_DATA_HOME/Outrage Entertainment/Descent 3" -ln -s "$GAMEDIR/config" "$XDG_DATA_HOME/Outrage Entertainment/Descent 3" +bind_directories "$XDG_DATA_HOME/Outrage Entertainment/Descent 3" "$GAMEDIR/config" # Source to parse d3.ini and import its settings source "$GAMEDIR/config/parseini.txt" @@ -57,7 +56,7 @@ else fi if [ "$LIBGL_FB" != "" ]; then - export SDL_VIDEO_GL_DRIVER="$GAMEDIR/gl4es.aarch64/libGL.so.1" + export SDL_VIDEO_GL_DRIVER="$GAMEDIR/gl4es.$DEVICE_ARCH/libGL.so.1" export LIBGL_DRIVERS_PATH="$GAMEDIR/gl4es.$DEVICE_ARCH/libGL.so.1" ARG="-g $LIBGL_DRIVERS_PATH" fi @@ -71,4 +70,4 @@ SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig" $ESUDO kill -9 $(pidof gptokeyb) $ESUDO systemctl restart oga_events & -printf "\033c" >> /dev/tty1 \ No newline at end of file +printf "\033c" >> /dev/tty1