From f5f84f2f7b4ad5a78a9fa257538f307562d11956 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 23 May 2023 15:24:54 -0400 Subject: [PATCH 1/2] Update Mupen64plus texture dir name Fix emulator reset when calling controller profile inst in Configurator --- functions/functions.sh | 2 +- functions/post_update.sh | 4 ++-- functions/prepare_emulator.sh | 8 ++++---- rd-submodules/retroarch | 2 +- rd-submodules/shared-modules | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/functions/functions.sh b/functions/functions.sh index b3627b34..5b39e43f 100644 --- a/functions/functions.sh +++ b/functions/functions.sh @@ -466,7 +466,7 @@ install_retrodeck_controller_profile() { if [[ -d "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/" && -d "$HOME/.steam/steam/controller_base/templates/" ]]; then rsync -a "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/" cp -f "$emuconfigs/defaults/retrodeck/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" - prepare_emulator "all" "reset" + prepare_emulator "reset" "all" else configurator_generic_dialog "RetroDECK Controller Profile Install" "The target directories for the controller profile do not exist.\n\nThis may happen if you do not have Steam installed or the location is does not have permission to be read." fi diff --git a/functions/post_update.sh b/functions/post_update.sh index 493196d7..c1642ad5 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -118,8 +118,8 @@ post_update() { dir_prep "$texture_packs_folder/RetroArch-Mesen" "/var/config/retroarch/system/HdPacks" dir_prep "$texture_packs_folder/PPSSPP" "/var/config/ppsspp/PSP/TEXTURES" dir_prep "$texture_packs_folder/PCSX2" "/var/config/PCSX2/textures" - dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/cache" "/var/config/retroarch/system/Mupen64Plus/cache" - dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/hires_texture" "/var/config/retroarch/system/Mupen64Plus/hires_texture" + dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/cache" "/var/config/retroarch/system/Mupen64plus/cache" + dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/hires_texture" "/var/config/retroarch/system/Mupen64plus/hires_texture" dir_prep "$texture_packs_folder/Duckstation" "/var/config/duckstation/textures" dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists" diff --git a/functions/prepare_emulator.sh b/functions/prepare_emulator.sh index be4d600b..8745e131 100644 --- a/functions/prepare_emulator.sh +++ b/functions/prepare_emulator.sh @@ -108,16 +108,16 @@ prepare_emulator() { cp -rf "/app/retrodeck/extras/MSX/Machines" "$bios_folder/Machines" dir_prep "$texture_packs_folder/RetroArch-Mesen" "/var/config/retroarch/system/HdPacks" - dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/cache" "/var/config/retroarch/system/Mupen64Plus/cache" - dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/hires_texture" "/var/config/retroarch/system/Mupen64Plus/hires_texture" + dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/cache" "/var/config/retroarch/system/Mupen64plus/cache" + dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/hires_texture" "/var/config/retroarch/system/Mupen64plus/hires_texture" fi if [[ "$action" == "postmove" ]]; then # Run only post-move commands dir_prep "$bios_folder" "/var/config/retroarch/system" dir_prep "$logs_folder/retroarch" "/var/config/retroarch/logs" dir_prep "$rdhome/shaders/retroarch" "/var/config/retroarch/shaders" dir_prep "$texture_packs_folder/RetroArch-Mesen" "/var/config/retroarch/system/HdPacks" - dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/cache" "/var/config/retroarch/system/Mupen64Plus/cache" - dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/hires_texture" "/var/config/retroarch/system/Mupen64Plus/hires_texture" + dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/cache" "/var/config/retroarch/system/Mupen64plus/cache" + dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/hires_texture" "/var/config/retroarch/system/Mupen64plus/hires_texture" set_setting_value "$raconf" "savefile_directory" "$saves_folder" "retroarch" set_setting_value "$raconf" "savestate_directory" "$states_folder" "retroarch" set_setting_value "$raconf" "screenshot_directory" "$screenshots_folder" "retroarch" diff --git a/rd-submodules/retroarch b/rd-submodules/retroarch index fbfdda61..0b1cfb79 160000 --- a/rd-submodules/retroarch +++ b/rd-submodules/retroarch @@ -1 +1 @@ -Subproject commit fbfdda61b3da092a71cc53999dd3e7b909f244e2 +Subproject commit 0b1cfb79e591e10488a3262d6b38db843c39a409 diff --git a/rd-submodules/shared-modules b/rd-submodules/shared-modules index 50314360..a2441b96 160000 --- a/rd-submodules/shared-modules +++ b/rd-submodules/shared-modules @@ -1 +1 @@ -Subproject commit 50314360ded6fa3b9f0b602513b1164b7a6636ed +Subproject commit a2441b964afefd8cd1cebcdf562c7878670daf42 From 5717d08a8fe78fd675fd7f3108693315e3a4f0f1 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 23 May 2023 16:16:54 -0400 Subject: [PATCH 2/2] Fixes for retroarch-all presets Fixes for Cheevos logout process --- functions/presets.sh | 17 ++++++++--------- tools/configurator.sh | 3 ++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/functions/presets.sh b/functions/presets.sh index c2fd0d86..07d57faf 100644 --- a/functions/presets.sh +++ b/functions/presets.sh @@ -95,7 +95,12 @@ build_preset_config() { case "$action" in "config_file_format" ) - local read_config_format="$read_preset" + if [[ "$read_preset" == "retroarch-all" ]]; then + local retroarch_all="true" + local read_config_format="retroarch" + else + local read_config_format="$read_preset" + fi ;; "target_file" ) @@ -118,7 +123,7 @@ build_preset_config() { if [[ "$new_setting_value" = \$* ]]; then eval new_setting_value=$new_setting_value fi - if [[ "$read_config_format" == "retroarch" ]]; then # If this is a RetroArch core, generate the override file + if [[ "$read_config_format" == "retroarch" && ! "$retroarch_all" == "true" ]]; then # If this is a RetroArch core, generate the override file if [[ ! -f "$read_target_file" ]]; then mkdir -p "$(realpath "$(dirname "$read_target_file")")" echo "$read_setting_name = \""$new_setting_value"\"" > "$read_target_file" @@ -130,13 +135,10 @@ build_preset_config() { fi fi else - if [[ "$read_config_format" == "retroarch-all" ]]; then - read_config_format="retroarch" - fi set_setting_value "$read_target_file" "$read_setting_name" "$new_setting_value" "$read_config_format" "$section" fi else - if [[ "$read_config_format" == "retroarch" ]]; then + if [[ "$read_config_format" == "retroarch" && ! "$retroarch_all" == "true" ]]; then if [[ -f "$read_target_file" ]]; then delete_setting "$read_target_file" "$read_setting_name" "$read_config_format" "$section" if [[ -z $(cat "$read_target_file") ]]; then # If the override file is empty @@ -147,9 +149,6 @@ build_preset_config() { fi fi else - if [[ "$read_config_format" == "retroarch-all" ]]; then - read_config_format="retroarch" - fi local default_setting_value=$(get_setting_value "$read_defaults_file" "$read_setting_name" "$read_config_format" "$section") set_setting_value "$read_target_file" "$read_setting_name" "$default_setting_value" "$read_config_format" "$section" fi diff --git a/tools/configurator.sh b/tools/configurator.sh index 69febd56..76bf4c1a 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -214,7 +214,8 @@ configurator_global_presets_and_settings_dialog() { "RetroAchievements: Logout" ) # This is a workaround to allow disabling cheevos without having to enter login credentials local cheevos_emulators=$(sed -n '/\[cheevos\]/, /\[/{ /\[cheevos\]/! { /\[/! p } }' $rd_conf | sed '/^$/d') - for emulator in $cheevos_emulators; do + for setting_line in $cheevos_emulators; do + emulator=$(get_setting_name "$setting_line" "retrodeck") set_setting_value "$rdconf" "$emulator" "false" "retrodeck" "cheevos" build_preset_config "$emulator" "cheevos" done