Skip to content

Commit ddc38a7

Browse files
authored
mupen64plus.sh: final fix for GlideN64 config version
We already extract GlideN64 config version. Use it to finally set right config version in mupen64plus package script. Mupen64plus startup script should do this as well, but it is not wrong to do it here. -set right GlideN64 config version in "$config.rp-dist" -set right GlideN64 config version in "$config" because GlideN64 overwrites user settings if config version is wrong fixes: RetroPie#3654
1 parent e05f4e9 commit ddc38a7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

scriptmodules/emulators/mupen64plus.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,16 @@ function configure_mupen64plus() {
316316
local config="$md_conf_root/n64/mupen64plus.cfg"
317317
local cmd="$md_inst/bin/mupen64plus --configdir $md_conf_root/n64 --datadir $md_conf_root/n64"
318318

319+
# patch existing mupen64plus config because Gliden64 overwrites user settings if config
320+
# version is wrong
321+
iniConfig " = " "" "$config"
322+
# Create GlideN64 section in .cfg
323+
if ! grep -q "\[Video-GLideN64\]" "$config"; then
324+
echo "[Video-GLideN64]" >> "$config"
325+
fi
326+
# Settings version. Don't touch it.
327+
iniSet "configVersion" "$(cat $md_inst/share/mupen64plus/GLideN64_config_version.ini)"
328+
319329
# if the user has an existing mupen64plus config we back it up, generate a new configuration
320330
# copy that to rp-dist and put the original config back again. We then make any ini changes
321331
# on the rp-dist file. This preserves any user configs from modification and allows us to have
@@ -345,7 +355,7 @@ function configure_mupen64plus() {
345355
echo "[Video-GLideN64]" >> "$config"
346356
fi
347357
# Settings version. Don't touch it.
348-
iniSet "configVersion" "29"
358+
iniSet "configVersion" "$(cat $md_inst/share/mupen64plus/GLideN64_config_version.ini)"
349359
# Bilinear filtering mode (0=N64 3point, 1=standard)
350360
iniSet "bilinearMode" "1"
351361
iniSet "EnableFBEmulation" "True"

0 commit comments

Comments
 (0)