Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scriptmodules/emulators/mupen64plus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ function configure_mupen64plus() {
# on the rp-dist file. This preserves any user configs from modification and allows us to have
# a default config for reference
if [[ -f "$config" ]]; then
# patch existing mupen64plus config because Gliden64 overwrites GlideN64 user configs
# if configVersion is wrong
grep -q "configVersion" "$config" && iniConfig " = " "" "$config" && iniSet "configVersion" "$(cat $md_inst/share/mupen64plus/GLideN64_config_version.ini)"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a good one-liner imho. It would be more readable to split it up and have inside an if

Also duplicating the path - keeping the config in a variable would be better.

Also note you can do $(<FILE) instead of cat.


mv "$config" "$config.user"
su "$user" -c "$cmd"
mv "$config" "$config.rp-dist"
Expand All @@ -345,7 +349,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