mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 15:35:38 +00:00
Correct some calls to xmlstarlet
Add Cemu to get_setting_value and set_setting_value Update Cemu prepare_emulator content Prepare and add savestate_auto_load and savestate_auto_save presets
This commit is contained in:
parent
fbd0deae99
commit
8e5e950841
|
@ -18,7 +18,7 @@ EnableWideScreenPatches = false
|
|||
EnableNoInterlacingPatches = false
|
||||
EnableRecordingTools = true
|
||||
EnableGameFixes = true
|
||||
SaveStateOnShutdown = true
|
||||
SaveStateOnShutdown = false
|
||||
ConsoleToStdio = false
|
||||
HostFs = false
|
||||
PatchBios = false
|
||||
|
|
|
@ -4,5 +4,6 @@ defaults_file^$emuconfigs/duckstation/settings.ini
|
|||
change^cheevos^Enabled^true^Cheevos
|
||||
change^cheevos^Username^$cheevos_username^Cheevos
|
||||
change^cheevos^Token^$cheevos_token^Cheevos
|
||||
change^cheevos^LoginTimestamp^$cheevos_login_timestamp
|
||||
change^cheevos_hardcore^ChallengeMode^true
|
||||
change^cheevos^LoginTimestamp^$cheevos_login_timestamp^Cheevos
|
||||
change^cheevos_hardcore^ChallengeMode^true^Cheevos
|
||||
change^savestate_auto_save^SaveStateOnExit^true^Main
|
||||
|
|
|
@ -4,5 +4,6 @@ defaults_file^$emuconfigs/PCSX2/PCSX2.ini
|
|||
change^cheevos^Enabled^true^Achievements
|
||||
change^cheevos^Username^$cheevos_username^Achievements
|
||||
change^cheevos^Token^$cheevos_token^Achievements
|
||||
change^cheevos^LoginTimestamp^$cheevos_login_timestamp
|
||||
change^cheevos_hardcore^ChallengeMode^true
|
||||
change^cheevos^LoginTimestamp^$cheevos_login_timestamp^Achievements
|
||||
change^cheevos_hardcore^ChallengeMode^true^Achievements
|
||||
change^savestate_auto_save^SaveStateOnShutdown^true^EmuCore
|
||||
|
|
|
@ -5,3 +5,5 @@ change^cheevos^cheevos_enable^true
|
|||
change^cheevos^cheevos_token^$cheevos_token
|
||||
change^cheevos^cheevos_username^$cheevos_username
|
||||
change^cheevos_hardcore^cheevos_hardcore_mode_enable^true
|
||||
change^savestate_auto_load^savestate_auto_load^true
|
||||
change^savestate_auto_save^savestate_auto_save^true
|
||||
|
|
|
@ -60,3 +60,11 @@ gba=false
|
|||
gbc=false
|
||||
n64=false
|
||||
snes=false
|
||||
|
||||
[savestate_auto_load]
|
||||
retroarch=true
|
||||
|
||||
[savestate_auto_save]
|
||||
duckstation=true
|
||||
pcsx2=true
|
||||
retroarch=true
|
||||
|
|
|
@ -10,7 +10,7 @@ StartPaused = false
|
|||
StartFullscreen = false
|
||||
PauseOnFocusLoss = true
|
||||
PauseOnMenu = true
|
||||
SaveStateOnExit = true
|
||||
SaveStateOnExit = false
|
||||
ConfirmPowerOff = true
|
||||
LoadDevicesFromSaveStates = true
|
||||
ApplyGameSettings = true
|
||||
|
|
|
@ -3090,8 +3090,8 @@ save_file_compression = "false"
|
|||
savefile_directory = "RETRODECKHOMEDIR/saves"
|
||||
savefiles_in_content_dir = "false"
|
||||
savestate_auto_index = "false"
|
||||
savestate_auto_load = "true"
|
||||
savestate_auto_save = "true"
|
||||
savestate_auto_load = "false"
|
||||
savestate_auto_save = "false"
|
||||
savestate_directory = "RETRODECKHOMEDIR/states"
|
||||
savestate_file_compression = "true"
|
||||
savestate_max_keep = "0"
|
||||
|
|
|
@ -160,7 +160,7 @@ changelog_dialog() {
|
|||
# USAGE: changelog_dialog "version"
|
||||
|
||||
if [[ "$1" == "all" ]]; then
|
||||
xmlstarlet sel -t -m "//release" -v "concat('RetroDECK version: ', @version)" -n -v "description" -n $rd_appdata | awk '{$1=$1;print}' | sed -e '/./b' -e :n -e 'N;s/\n$//;tn' > "/var/config/retrodeck/changelog.txt"
|
||||
xml sel -t -m "//release" -v "concat('RetroDECK version: ', @version)" -n -v "description" -n $rd_appdata | awk '{$1=$1;print}' | sed -e '/./b' -e :n -e 'N;s/\n$//;tn' > "/var/config/retrodeck/changelog.txt"
|
||||
|
||||
zenity --icon-name=net.retrodeck.retrodeck --text-info --width=1200 --height=720 \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
|
|
|
@ -49,7 +49,6 @@ pretty_system_names_reference_list="$emuconfigs/defaults/retrodeck/reference_lis
|
|||
|
||||
# Config files for emulators with single config files
|
||||
|
||||
cemuconf="/var/config/Cemu/settings.xml"
|
||||
citraconf="/var/config/citra-emu/qt-config.ini"
|
||||
duckstationconf="/var/config/duckstation/settings.ini"
|
||||
melondsconf="/var/config/melonDS/melonDS.ini"
|
||||
|
@ -67,6 +66,11 @@ es_settings="/var/config/emulationstation/.emulationstation/es_settings.xml"
|
|||
raconf="/var/config/retroarch/retroarch.cfg"
|
||||
ra_core_conf="/var/config/retroarch/retroarch-core-options.cfg"
|
||||
|
||||
# CEMU config files
|
||||
|
||||
cemuconf="/var/config/Cemu/settings.xml"
|
||||
cemucontrollerconf="/var/config/Cemu/controllerProfiles/controller0.xml"
|
||||
|
||||
# Dolphin config files
|
||||
|
||||
dolphinconf="/var/config/dolphin-emu/Dolphin.ini"
|
||||
|
|
|
@ -45,6 +45,14 @@ set_setting_value() {
|
|||
fi
|
||||
;;
|
||||
|
||||
"cemu" )
|
||||
if [[ -z "$current_section_name" ]]; then
|
||||
xml ed -L -u "//$setting_name_to_change" -v "$setting_value_to_change" "$1"
|
||||
else
|
||||
xml ed -L -u "//$current_section_name/$setting_name_to_change" -v "$setting_value_to_change" "$1"
|
||||
fi
|
||||
;;
|
||||
|
||||
"es_settings" )
|
||||
sed -i 's^'"$setting_name_to_change"'" value=".*"^'"$setting_name_to_change"'" value="'"$setting_value_to_change"'"^' $1
|
||||
;;
|
||||
|
@ -116,6 +124,14 @@ get_setting_value() {
|
|||
fi
|
||||
;;
|
||||
|
||||
"cemu" )
|
||||
if [[ -z "$current_section_name" ]]; then
|
||||
echo $(xml sel -t -v "//$current_setting_name" $1)
|
||||
else
|
||||
echo $(xml sel -t -v "//$current_section_name/$current_setting_name" $1)
|
||||
fi
|
||||
;;
|
||||
|
||||
"es_settings" )
|
||||
echo $(grep -o -P "(?<=$current_setting_name\" value=\").*(?=\")" $1)
|
||||
;;
|
||||
|
|
|
@ -82,6 +82,8 @@ post_update() {
|
|||
# - Move Dolphin and Primehack save folder names
|
||||
# - Move PPSSPP saves/states to appropriate folders
|
||||
# - Set ESDE user themes folder directly
|
||||
# - Disable auto-save/load in RA / PCSX2 / Duckstation for proper preset functionality
|
||||
# - Init Cemu as it is a new emulator
|
||||
|
||||
update_rd_conf # Expand retrodeck.cfg to latest template
|
||||
set_setting_value $rd_conf "screenshots_folder" "$rdhome/screenshots"
|
||||
|
@ -184,6 +186,13 @@ post_update() {
|
|||
unlink "/var/config/emulationstation/ROMs"
|
||||
unlink "/var/config/emulationstation/.emulationstation/downloaded_media"
|
||||
unlink "/var/config/emulationstation/.emulationstation/themes"
|
||||
|
||||
set_setting_value "$raconf" "savestate_auto_load" "false" "retroarch"
|
||||
set_setting_value "$raconf" "savestate_auto_save" "false" "retroarch"
|
||||
set_setting_value "$pcsx2conf" "SaveStateOnShutdown" "false" "pcsx2" "EmuCore"
|
||||
set_setting_value "$duckstationconf" "SaveStateOnExit" "false" "duckstation" "Main"
|
||||
|
||||
prepare_emulator "reset" "cemu"
|
||||
fi
|
||||
|
||||
# The following commands are run every time.
|
||||
|
|
|
@ -136,21 +136,28 @@ prepare_emulator() {
|
|||
echo "----------------------"
|
||||
echo "Initializing CEMU"
|
||||
echo "----------------------"
|
||||
rm -rf /var/config/Cemu
|
||||
mkdir -pv /var/config/Cemu/
|
||||
cp -fr "$emuconfigs/cemu/"* /var/config/Cemu/
|
||||
#TODO : set_setting_value for Cemu and multi_user
|
||||
sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' /var/config/Cemu/settings.xml
|
||||
dir_prep "$rdhome/saves/wiiu/cemu" "$rdhome/bios/cemu/usr/save"
|
||||
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
||||
rm -rf "$multi_user_data_folder/$SteamAppUser/config/Cemu"
|
||||
mkdir -p "$multi_user_data_folder/$SteamAppUser/config/Cemu"
|
||||
cp -fr "$emuconfigs/cemu/"* "$multi_user_data_folder/$SteamAppUser/config/Cemu/"
|
||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/Cemu/settings.ini" "mlc_path" "$bios_folder/cemu" "cemu"
|
||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/Cemu/settings.ini" "Entry" "$roms_folder/wiiu" "cemu" "GamePaths"
|
||||
dir_prep "$multi_user_data_folder/$SteamAppUser/config/Cemu" "/var/config/Cemu"
|
||||
else
|
||||
rm -rf /var/config/Cemu
|
||||
mkdir -pv /var/config/Cemu/
|
||||
cp -fr "$emuconfigs/cemu/"* /var/config/Cemu/
|
||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/Cemu/settings.ini" "mlc_path" "$bios_folder/cemu" "cemu"
|
||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/Cemu/settings.ini" "Entry" "$roms_folder/wiiu" "cemu" "GamePaths"
|
||||
fi
|
||||
# Shared actions
|
||||
dir_prep "$saves_folder/wiiu/cemu" "$bios_folder/cemu/usr/save"
|
||||
fi
|
||||
if [[ "$action" == "reset" ]] || [[ "$action" == "postmove" ]]; then # Run commands that apply to both resets and moves
|
||||
#TODO : set_setting_value for Cemu and multi_user
|
||||
sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' /var/config/Cemu/settings.xml
|
||||
dir_prep "$rdhome/saves/wiiu/cemu" "$rdhome/bios/cemu/usr/save"
|
||||
if [[ "$action" == "postmove" ]]; then # Run commands that apply to both resets and moves
|
||||
set_setting_value "$cemuconf" "mlc_path" "$bios_folder/cemu" "cemu"
|
||||
set_setting_value "$cemuconf" "Entry" "$roms_folder/wiiu" "cemu" "GamePaths"
|
||||
dir_prep "$saves_folder/wiiu/cemu" "$bios_folder/cemu/usr/save"
|
||||
fi
|
||||
# if [[ "$action" == "postmove" ]]; then # Run only post-move commands
|
||||
|
||||
# fi
|
||||
fi
|
||||
|
||||
if [[ "$emulator" =~ ^(citra|citra-emu|Citra|all)$ ]]; then
|
||||
|
|
|
@ -1045,7 +1045,7 @@ configurator_about_retrodeck_dialog() {
|
|||
}
|
||||
|
||||
configurator_version_history_dialog() {
|
||||
local version_array=($(xmlstarlet sel -t -v '//component/releases/release/@version' -n $rd_appdata))
|
||||
local version_array=($(xml sel -t -v '//component/releases/release/@version' -n $rd_appdata))
|
||||
local all_versions_list=()
|
||||
|
||||
for rd_version in ${version_array[*]}; do
|
||||
|
|
Loading…
Reference in a new issue