From be12d0c4f4c691bd3e493ee1fa0f5f436d334b44 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 5 May 2024 09:39:30 +0200 Subject: [PATCH] MAME: exposing samples folder --- functions/post_update.sh | 5 +++++ functions/prepare_component.sh | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/functions/post_update.sh b/functions/post_update.sh index 4ff0c964..dc074924 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -310,6 +310,11 @@ post_update() { mv -f "$rdhome/gamelists/"* "$rdhome/ES-DE/gamelists" rm -rf "$rdhome/gamelists" + log i "MAME-SA, migrating samples to the new exposed folder: from \"/var/data/mame/assets/samples\" to \"$bios_folder/mame-sa/samples\"" + create_dir "$bios_folder/mame-sa/samples" + mv -r "/var/data/mame/assets/samples/"* "$bios_folder/mame-sa/samples" + set_setting_value "$mameconf" "samplepath" "$bios_folder/mame-sa/samples" "mame" + log d "Verifying with user if they want to reset Ryujinx" if [[ "$(configurator_generic_question_dialog "RetroDECK 0.8.1b Ryujinx Reset" "In RetroDECK 0.8.0b the Ryujinx emulator was not properly initialized for upgrading users.\nThis would cause Ryujinx to not work properly.\n\nWould you like to reset Ryujinx to default RetroDECK settings now?\n\nIf you have made your own changes to the Ryujinx config, you can decline this reset.")" == "true" ]]; then log d "User agreed to Ryujinx reset" diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index 26b8c483..2cf446e9 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -758,7 +758,7 @@ prepare_component() { create_dir "/var/data/mame/plugin-data" create_dir "/var/data/mame/hash" - create_dir "/var/data/mame/assets/samples" + create_dir "$bios_folder/mame-sa/samples" create_dir "/var/data/mame/assets/artwork" create_dir "/var/data/mame/assets/fonts" create_dir "/var/data/mame/cheat" @@ -799,6 +799,7 @@ prepare_component() { set_setting_value "$mameconf" "state_directory" "$states_folder/mame-sa" "mame" set_setting_value "$mameconf" "snapshot_directory" "$screenshots_folder/mame-sa" "mame" set_setting_value "$mameconf" "diff_directory" "$saves_folder/mame-sa/diff" "mame" + set_setting_value "$mameconf" "samplepath" "$bios_folder/mame-sa/samples" "mame" fi