From e08fb8850e95480f95920e53418cec388df4ea0d Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 27 Sep 2023 09:36:36 +0200 Subject: [PATCH] Added Ryujinx to the Configurator --- functions/prepare_emulator.sh | 52 +++++++++++++++++------------------ tools/configurator.sh | 4 ++- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/functions/prepare_emulator.sh b/functions/prepare_emulator.sh index de1988b7..ca61f99e 100644 --- a/functions/prepare_emulator.sh +++ b/functions/prepare_emulator.sh @@ -539,32 +539,32 @@ prepare_emulator() { fi fi - # if [[ "$emulator" =~ ^(ryujunx|Ryujinx|all)$ ]]; then - # if [[ "$action" == "reset" ]]; then # Run reset-only commands - # echo "------------------------" - # echo "Initializing RYUJINX" - # echo "------------------------" - # if [[ $multi_user_mode == "true" ]]; then - # rm -rf "$multi_user_data_folder/$SteamAppUser/config/Ryujinx" - # mkdir -p "$multi_user_data_folder/$SteamAppUser/config/Ryujinx/system" - # cp -fv $emuconfigs/ryujinx/* "$multi_user_data_folder/$SteamAppUser/config/Ryujinx" - # sed -i 's#/home/deck/retrodeck#'$rdhome'#g' "$multi_user_data_folder/$SteamAppUser/config/Ryujinx/Config.json" - # dir_prep "$multi_user_data_folder/$SteamAppUser/config/Ryujinx" "/var/config/Ryujinx" - # else - # # removing config directory to wipe legacy files - # rm -rf /var/config/Ryujinx - # mkdir -p /var/config/Ryujinx/system - # cp -fv $emuconfigs/ryujinx/* /var/config/Ryujinx - # sed -i 's#/home/deck/retrodeck#'$rdhome'#g' "$ryujinxconf" - # fi - # fi - # if [[ "$action" == "reset" ]] || [[ "$action" == "postmove" ]]; then # Run commands that apply to both resets and moves - # dir_prep "$bios_folder/switch/keys" "/var/config/Ryujinx/system" - # fi - # if [[ "$action" == "postmove" ]]; then # Run only post-move commands - # sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' "$ryujinxconf" # This is an unfortunate one-off because set_setting_value does not currently support JSON - # fi - # fi + if [[ "$emulator" =~ ^(ryujunx|Ryujinx|all)$ ]]; then + if [[ "$action" == "reset" ]]; then # Run reset-only commands + echo "------------------------" + echo "Initializing RYUJINX" + echo "------------------------" + if [[ $multi_user_mode == "true" ]]; then + rm -rf "$multi_user_data_folder/$SteamAppUser/config/Ryujinx" + mkdir -p "$multi_user_data_folder/$SteamAppUser/config/Ryujinx/system" + cp -fv $emuconfigs/ryujinx/* "$multi_user_data_folder/$SteamAppUser/config/Ryujinx" + sed -i 's#/home/deck/retrodeck#'$rdhome'#g' "$multi_user_data_folder/$SteamAppUser/config/Ryujinx/Config.json" + dir_prep "$multi_user_data_folder/$SteamAppUser/config/Ryujinx" "/var/config/Ryujinx" + else + # removing config directory to wipe legacy files + rm -rf /var/config/Ryujinx + mkdir -p /var/config/Ryujinx/system + cp -fv $emuconfigs/ryujinx/* /var/config/Ryujinx + sed -i 's#/home/deck/retrodeck#'$rdhome'#g' "$ryujinxconf" + fi + fi + if [[ "$action" == "reset" ]] || [[ "$action" == "postmove" ]]; then # Run commands that apply to both resets and moves + dir_prep "$bios_folder/switch/keys" "/var/config/Ryujinx/system" + fi + if [[ "$action" == "postmove" ]]; then # Run only post-move commands + sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' "$ryujinxconf" # This is an unfortunate one-off because set_setting_value does not currently support JSON + fi + fi if [[ "$emulator" =~ ^(xemu|XEMU|all)$ ]]; then if [[ "$action" == "reset" ]]; then # Run reset-only commands diff --git a/tools/configurator.sh b/tools/configurator.sh index 175a7174..ed7bee92 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -432,7 +432,9 @@ configurator_open_emulator_dialog() { "Primehack" "Open the Metroid Prime emulator Primehack" \ "RPCS3" "Open the PS3 emulator RPCS3" \ "XEMU" "Open the Xbox emulator XEMU" \ - "Yuzu" "Open the Switch emulator Yuzu" ) + "Yuzu" "Open the Switch emulator Yuzu" \ + "Ryujinx" "Open the Switch emulator Ryujinx" + ) case $emulator in