From 098300be1e09aaaa70e1a2330e44496a06b20eac Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 29 Apr 2024 11:56:44 -0400 Subject: [PATCH 1/4] Remove redundant controller profile cleanup --- retrodeck.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/retrodeck.sh b/retrodeck.sh index d9bfc95c..52cd7697 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -183,12 +183,6 @@ if [[ $update_check == "true" ]]; then log i "You're running the latest version" fi -# THIS IS A ONE-OFF FORCED REFRESH OF RETRODECK CONTROLLER PROFILES IN A 0.7.6b VERSION REFRESH - REMOVE BEFORE NEXT VERSION RELEASE -if [[ -f "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" ]]; then # If RetroDECK controller profile has been previously installed - install_retrodeck_controller_profile -fi -# REMOVE BEFORE NEXT VERSION RELEASE - # Normal Startup if [[ $steam_sync == "true" ]]; then From 1869b8889b1355f61dbf868f8a27797a17cba92a Mon Sep 17 00:00:00 2001 From: icenine451 Date: Fri, 3 May 2024 09:10:05 -0400 Subject: [PATCH 2/4] Add support for non-yml RPCS3 ini files in framework --- functions/framework.sh | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/functions/framework.sh b/functions/framework.sh index 86ae0fbd..92f3b32e 100644 --- a/functions/framework.sh +++ b/functions/framework.sh @@ -39,11 +39,21 @@ set_setting_value() { fi ;; - "rpcs3" | "vita3k" ) # This does not currently work for settings with a $ in them - if [[ -z $current_section_name ]]; then - sed -i 's^\^'"$setting_name_to_change"': .*^'"$setting_name_to_change"': '"$setting_value_to_change"'^' "$1" - else - sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"'.*^s^\^'"$setting_name_to_change"': .*^'"$setting_name_to_change"': '"$setting_value_to_change"'^' "$1" + "rpcs3" | "vita3k" ) + # This does not currently work for settings with a $ in them + + if [[ "$1" =~ (.ini)$ ]]; then # If this is a RPCS3 .ini file + if [[ -z $current_section_name ]]; then + sed -i 's^\^'"$setting_name_to_change"'=.*^'"$setting_name_to_change"'='"$setting_value_to_change"'^' "$1" + else + sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"'=^s^\^'"$setting_name_to_change"'=.*^'"$setting_name_to_change"'='"$setting_value_to_change"'^' "$1" + fi + elif [[ "$1" =~ (.yml)$ ]]; then # If this is an YML-based file + if [[ -z $current_section_name ]]; then + sed -i 's^\^'"$setting_name_to_change"': .*^'"$setting_name_to_change"': '"$setting_value_to_change"'^' "$1" + else + sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"'.*^s^\^'"$setting_name_to_change"': .*^'"$setting_name_to_change"': '"$setting_value_to_change"'^' "$1" + fi fi ;; @@ -55,7 +65,9 @@ set_setting_value() { fi ;; - "mame" ) # In this option, $current_section_name is the in the .cfg file. + "mame" ) + # In this option, $current_section_name is the in the .cfg file. + local mame_current_value=$(get_setting_value "$1" "$setting_name_to_change" "$4" "$current_section_name") if [[ "$1" =~ (.ini)$ ]]; then # If this is a MAME .ini file sed -i '\^\^'"$setting_name_to_change"'\s^s^'"$mame_current_value"'^'"$setting_value_to_change"'^' "$1" @@ -84,7 +96,11 @@ get_setting_name() { ;; "rpcs3" | "vita3k" ) - echo "$current_setting_line" | grep -o -P "^\s*?.*?(?=\s?:\s?)" | sed -e 's/^[ \t]*//;s^\\ ^ ^g' + if [[ "$1" =~ (.ini)$ ]]; then # If this is a RPCS3 .ini file + echo "$current_setting_line" | grep -o -P "^\s*?.*?(?=\s?=\s?)" | sed -e 's/^[ \t]*//;s^\\ ^ ^g;s^\\$^^' + elif [[ "$1" =~ (.yml)$ ]]; then # If this is an YML-based file + echo "$current_setting_line" | grep -o -P "^\s*?.*?(?=\s?:\s?)" | sed -e 's/^[ \t]*//;s^\\ ^ ^g' + fi ;; "mame" ) # This only works for mame .ini files, not the .cfg XML files From eca9099ccc2a415be30bb8d91c302b2c54f2b554 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Fri, 3 May 2024 09:11:13 -0400 Subject: [PATCH 3/4] Add RPCS3 to ask-to-exit preset in retrodeck.cfg --- emu-configs/defaults/retrodeck/retrodeck.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/emu-configs/defaults/retrodeck/retrodeck.cfg b/emu-configs/defaults/retrodeck/retrodeck.cfg index 4056cc07..9e824ece 100644 --- a/emu-configs/defaults/retrodeck/retrodeck.cfg +++ b/emu-configs/defaults/retrodeck/retrodeck.cfg @@ -82,3 +82,4 @@ duckstation=false pcsx2=false primehack=false citra=false +rpcs3=false From defb31a27a1e562cd43176d18ddd3e30d37849f7 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Fri, 3 May 2024 09:11:38 -0400 Subject: [PATCH 4/4] Set RPCS3 to not ask-on-exit by default, to support preset option --- emu-configs/rpcs3/GuiConfigs/CurrentSettings.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emu-configs/rpcs3/GuiConfigs/CurrentSettings.ini b/emu-configs/rpcs3/GuiConfigs/CurrentSettings.ini index 686e870d..0ef87f08 100644 --- a/emu-configs/rpcs3/GuiConfigs/CurrentSettings.ini +++ b/emu-configs/rpcs3/GuiConfigs/CurrentSettings.ini @@ -47,5 +47,5 @@ main_window_stop=Ctrl+Q main_window_toggle_fullscreen=Ctrl+Return [main_window] -confirmationBoxExitGame=true -infoBoxEnabledWelcome=false \ No newline at end of file +confirmationBoxExitGame=false +infoBoxEnabledWelcome=false