mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 14:05:39 +00:00
Fixes for retroarch-all presets
Fixes for Cheevos logout process
This commit is contained in:
parent
f5f84f2f7b
commit
5717d08a8f
|
@ -95,7 +95,12 @@ build_preset_config() {
|
||||||
case "$action" in
|
case "$action" in
|
||||||
|
|
||||||
"config_file_format" )
|
"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" )
|
"target_file" )
|
||||||
|
@ -118,7 +123,7 @@ build_preset_config() {
|
||||||
if [[ "$new_setting_value" = \$* ]]; then
|
if [[ "$new_setting_value" = \$* ]]; then
|
||||||
eval new_setting_value=$new_setting_value
|
eval new_setting_value=$new_setting_value
|
||||||
fi
|
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
|
if [[ ! -f "$read_target_file" ]]; then
|
||||||
mkdir -p "$(realpath "$(dirname "$read_target_file")")"
|
mkdir -p "$(realpath "$(dirname "$read_target_file")")"
|
||||||
echo "$read_setting_name = \""$new_setting_value"\"" > "$read_target_file"
|
echo "$read_setting_name = \""$new_setting_value"\"" > "$read_target_file"
|
||||||
|
@ -130,13 +135,10 @@ build_preset_config() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
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"
|
set_setting_value "$read_target_file" "$read_setting_name" "$new_setting_value" "$read_config_format" "$section"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ "$read_config_format" == "retroarch" ]]; then
|
if [[ "$read_config_format" == "retroarch" && ! "$retroarch_all" == "true" ]]; then
|
||||||
if [[ -f "$read_target_file" ]]; then
|
if [[ -f "$read_target_file" ]]; then
|
||||||
delete_setting "$read_target_file" "$read_setting_name" "$read_config_format" "$section"
|
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
|
if [[ -z $(cat "$read_target_file") ]]; then # If the override file is empty
|
||||||
|
@ -147,9 +149,6 @@ build_preset_config() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
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")
|
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"
|
set_setting_value "$read_target_file" "$read_setting_name" "$default_setting_value" "$read_config_format" "$section"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -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
|
"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')
|
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"
|
set_setting_value "$rdconf" "$emulator" "false" "retrodeck" "cheevos"
|
||||||
build_preset_config "$emulator" "cheevos"
|
build_preset_config "$emulator" "cheevos"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue