diff --git a/scriptmodules/emulators/mupen64plus.sh b/scriptmodules/emulators/mupen64plus.sh index a05930239f..298a841bf7 100644 --- a/scriptmodules/emulators/mupen64plus.sh +++ b/scriptmodules/emulators/mupen64plus.sh @@ -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 @@ -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"