From b0759ff2d23ec0e4af6e09d195bd6aea7515d1ea Mon Sep 17 00:00:00 2001 From: Jools Wills Date: Wed, 25 May 2022 05:30:10 +0100 Subject: [PATCH] helpers - fix sdl1 dependency installing on non RPi platforms. In the past unsupported scriptmodules for a platform were not loaded, so rp_hasModule would only return true if the module was available for the platform. As we now load all modules for displaying of information in retropie_setup / retropie_packages output, rp_hasModule function will return true, so we need to use rp_isEnabled instead. This fixes installing scriptmodules with an sdl1.2-dev dependency on non RPi (eg x86/x11), that previously forced our custom sdl1 and then failed as it's disabled for the target. --- scriptmodules/helpers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scriptmodules/helpers.sh b/scriptmodules/helpers.sh index 3630f40d26..b25aafacdf 100644 --- a/scriptmodules/helpers.sh +++ b/scriptmodules/helpers.sh @@ -227,10 +227,10 @@ function _mapPackage() { compareVersions "$__os_debian_ver" lt 9 && pkg="libpng12-dev" ;; libsdl1.2-dev) - rp_hasModule "sdl1" && pkg="RP sdl1 $pkg" + rp_isEnabled "sdl1" && pkg="RP sdl1 $pkg" ;; libsdl2-dev) - if rp_hasModule "sdl2"; then + if rp_isEnabled "sdl2"; then # check whether to use our own sdl2 - can be disabled to resolve issues with # mixing custom 64bit sdl2 and os distributed i386 version on multiarch local own_sdl2=1