Actually set ESDE settings properly

Cleanup old ESDE symlinks
This commit is contained in:
icenine451 2023-05-11 16:59:01 -04:00
parent 8c9a81e1ab
commit 56cbc78427
2 changed files with 12 additions and 8 deletions

View file

@ -1387,19 +1387,19 @@ prepare_emulator() {
if [[ "$emulator" =~ ^(emulationstation|all)$ ]]; then # For use after ESDE-related folders are moved or a reset
if [[ "$action" == "reset" ]]; then
rm -rf /var/config/emulationstation/
mkdir -p /var/config/emulationstation/
mkdir -p /var/config/emulationstation/.emulationstation/
cp -f /app/retrodeck/es_settings.xml /var/config/emulationstation/.emulationstation/es_settings.xml
set_setting_value "es_settings.xml" "ROMDirectory" "$roms_folder" "es_settings"
set_setting_value "es_settings.xml" "MediaDirectory" "$media_folder" "es_settings"
set_setting_value "es_settings.xml" "UserThemeDirectory" "$themes_folder" "es_settings"
set_setting_value "$es_settings" "ROMDirectory" "$roms_folder" "es_settings"
set_setting_value "$es_settings" "MediaDirectory" "$media_folder" "es_settings"
set_setting_value "$es_settings" "UserThemeDirectory" "$themes_folder" "es_settings"
emulationstation --home /var/config/emulationstation --create-system-dirs
update_splashscreens
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists"
fi
if [[ "$action" == "postmove" ]]; then
set_setting_value "es_settings.xml" "ROMDirectory" "$roms_folder" "es_settings"
set_setting_value "es_settings.xml" "MediaDirectory" "$media_folder" "es_settings"
set_setting_value "es_settings.xml" "UserThemeDirectory" "$themes_folder" "es_settings"
set_setting_value "$es_settings" "ROMDirectory" "$roms_folder" "es_settings"
set_setting_value "$es_settings" "MediaDirectory" "$media_folder" "es_settings"
set_setting_value "$es_settings" "UserThemeDirectory" "$themes_folder" "es_settings"
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists"
fi
fi

View file

@ -173,7 +173,11 @@ post_update() {
dir_prep "$saves_folder/PSP/PPSSPP-SA" "/var/config/ppsspp/PSP/SAVEDATA"
dir_prep "$states_folder/PSP/PPSSPP-SA" "/var/config/ppsspp/PSP/PPSSPP_STATE"
set_setting_value "es_settings.xml" "UserThemeDirectory" "$themes_folder" "es_settings"
set_setting_value "$es_settings" "ROMDirectory" "$roms_folder" "es_settings"
set_setting_value "$es_settings" "MediaDirectory" "$media_folder" "es_settings"
set_setting_value "$es_settings" "UserThemeDirectory" "$themes_folder" "es_settings"
unlink "/var/config/emulationstation/ROMs"
unlink "/var/config/emulationstation/.emulationstation/downloaded_media"
unlink "/var/config/emulationstation/.emulationstation/themes"
fi