mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 07:25:38 +00:00
SET_SETTING_VALUE: edited to use initool
This commit is contained in:
parent
127bcdb6cd
commit
b56916c2b0
|
@ -12,15 +12,9 @@ set_setting_value() {
|
||||||
|
|
||||||
case $4 in
|
case $4 in
|
||||||
|
|
||||||
"retrodeck" | "melonds" | "yuzu" | "citra" | "libretro_scummvm" )
|
"retrodeck" | "melonds" | "yuzu" | "citra" | "libretro_scummvm" | "ini" )
|
||||||
if [[ -z $current_section_name ]]; then
|
initool set "$1" $current_section_name $setting_name_to_change $setting_value_to_change > "$1.new" && mv -f "$1.new" "$1"
|
||||||
sed -i 's^\^'"$setting_name_to_change"'=.*^'"$setting_name_to_change"'='"$setting_value_to_change"'^' "$1"
|
conf_read
|
||||||
else
|
|
||||||
sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"'=^s^\^'"$setting_name_to_change"'=.*^'"$setting_name_to_change"'='"$setting_value_to_change"'^' "$1"
|
|
||||||
fi
|
|
||||||
if [[ "$4" == "retrodeck" && ("$current_section_name" == "" || "$current_section_name" == "paths" || "$current_section_name" == "options") ]]; then # If a RetroDECK setting is being changed, also write it to memory for immediate use
|
|
||||||
declare -g "$setting_name_to_change=$setting_value_to_change"
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"retroarch" )
|
"retroarch" )
|
||||||
|
|
Loading…
Reference in a new issue