diff --git a/packages/apps/portmaster/scripts/portmaster_compatibility.sh b/packages/apps/portmaster/scripts/portmaster_compatibility.sh index 6444ade689..cd4b2923f6 100644 --- a/packages/apps/portmaster/scripts/portmaster_compatibility.sh +++ b/packages/apps/portmaster/scripts/portmaster_compatibility.sh @@ -17,9 +17,20 @@ case "${QUIRK_DEVICE}" in done; ;; *) - #Remove gl4es libs on devices that support OpenGL + #Remove gl4es libs on devices that support OpenGL and sed any port that refrences it rm -rf /storage/roms/ports/*/lib*/libEGL* rm -rf /storage/roms/ports/*/lib*/libGL* + for port in /storage/roms/ports/*.sh; do + sed -i '/^export SDL_VIDEO_GL_DRIVER/c\#export SDL_VIDEO_GL_DRIVER"' "$port" + sed -i '/^export SDL_VIDEO_EGL_DRIVER/c\#export SDL_VIDEO_EGL_DRIVER' "$port" + echo Fixing: "$port"; + done; + + #Remove S922X fix if exists + for port in /storage/roms/ports/*.sh; do + sed -i '/get_controls && export/c\get_controls' "$port" + echo Fixing: "$port"; + done; ;; esac fi diff --git a/packages/apps/portmaster/scripts/start_portmaster.sh b/packages/apps/portmaster/scripts/start_portmaster.sh index 69a4cbbf76..0a4ae49fba 100644 --- a/packages/apps/portmaster/scripts/start_portmaster.sh +++ b/packages/apps/portmaster/scripts/start_portmaster.sh @@ -68,6 +68,9 @@ fi #Make sure permissions are correct in the PortMaster folder find /storage/roms/ports/ -not -perm 755 -exec chmod 755 {} \; +#Fix compatability for some portmaster ports +/usr/bin/portmaster_compatibility.sh + #Start PortMaster @LIBEGL@ cd /storage/roms/ports/PortMaster diff --git a/packages/apps/portmaster/sources/control.txt b/packages/apps/portmaster/sources/control.txt index d19f7e4c46..b2ce010546 100644 --- a/packages/apps/portmaster/sources/control.txt +++ b/packages/apps/portmaster/sources/control.txt @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2023-present - The JELOS Project (https://github.com/JustEnoughLinuxOS) -# This file can and should be sourced by ports for various parameters to +# This file can and should be sourced by ports for various parameters to # minimize script customizations and allow for easier future updates # like adding additional supported devices. -# Thanks to JohnnyonFlame, dhwz, romadu, and shantigilbert for the +# Thanks to JohnnyonFlame, dhwz, romadu, and shantigilbert for the # suggestion and assistance with this. # Source used for gptokeyb available at # https://github.com/christianhaitian/gptokeyb @@ -89,7 +89,6 @@ get_controls() { # Set compatability libs and run compatability script export LD_LIBRARY_PATH=${clibs} - /usr/bin/portmaster_compatibility.sh # Now find any controller mapped on emulationstation... /storage/.config/PortMaster/mapper.txt SDL_GAMECONTROLLERCONFIG_FILE > /dev/null 2>&1