Skip to content

Commit

Permalink
mupen64plus.sh: final fix for GlideN64 config version
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gizmo98 authored Mar 19, 2023
1 parent e05f4e9 commit ddc38a7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scriptmodules/emulators/mupen64plus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,16 @@ function configure_mupen64plus() {
local config="$md_conf_root/n64/mupen64plus.cfg"
local cmd="$md_inst/bin/mupen64plus --configdir $md_conf_root/n64 --datadir $md_conf_root/n64"

# patch existing mupen64plus config because Gliden64 overwrites user settings if config
# version is wrong
iniConfig " = " "" "$config"
# Create GlideN64 section in .cfg
if ! grep -q "\[Video-GLideN64\]" "$config"; then
echo "[Video-GLideN64]" >> "$config"
fi
# Settings version. Don't touch it.
iniSet "configVersion" "$(cat $md_inst/share/mupen64plus/GLideN64_config_version.ini)"

# if the user has an existing mupen64plus config we back it up, generate a new configuration
# copy that to rp-dist and put the original config back again. We then make any ini changes
# on the rp-dist file. This preserves any user configs from modification and allows us to have
Expand Down Expand Up @@ -345,7 +355,7 @@ function configure_mupen64plus() {
echo "[Video-GLideN64]" >> "$config"
fi
# Settings version. Don't touch it.
iniSet "configVersion" "29"
iniSet "configVersion" "$(cat $md_inst/share/mupen64plus/GLideN64_config_version.ini)"
# Bilinear filtering mode (0=N64 3point, 1=standard)
iniSet "bilinearMode" "1"
iniSet "EnableFBEmulation" "True"
Expand Down

0 comments on commit ddc38a7

Please sign in to comment.