mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-28 08:35:42 +00:00
Reverse $preset and $choice argument order for make_preset_changes() to avoid having to send a null array if all systems are being disabled.
This commit is contained in:
parent
353c626a37
commit
13e7ebd8b2
|
@ -32,7 +32,7 @@ change_preset_dialog() {
|
||||||
|
|
||||||
if [[ ! -z $choice || "$rc" == 0 ]]; then
|
if [[ ! -z $choice || "$rc" == 0 ]]; then
|
||||||
(
|
(
|
||||||
make_preset_changes "$choice" "$1"
|
make_preset_changes "$1" "$choice"
|
||||||
) |
|
) |
|
||||||
rd_zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
rd_zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
||||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||||
|
@ -84,7 +84,7 @@ build_preset_list_options() {
|
||||||
make_preset_changes() {
|
make_preset_changes() {
|
||||||
# This function will take a preset name $preset and a CSV list $choice, which contains the names of systems that have been enabled for this preset and enable them in the backend
|
# This function will take a preset name $preset and a CSV list $choice, which contains the names of systems that have been enabled for this preset and enable them in the backend
|
||||||
# Any systems which are currently enabled and not in the CSV list $choice will instead be disabled in the backend
|
# Any systems which are currently enabled and not in the CSV list $choice will instead be disabled in the backend
|
||||||
# USAGE: make_preset_changes $choice $preset
|
# USAGE: make_preset_changes $preset $choice
|
||||||
|
|
||||||
# Fetch incompatible presets from JSON and create a lookup list
|
# Fetch incompatible presets from JSON and create a lookup list
|
||||||
incompatible_presets=$(jq -r '
|
incompatible_presets=$(jq -r '
|
||||||
|
@ -95,8 +95,8 @@ make_preset_changes() {
|
||||||
] | join("\n")
|
] | join("\n")
|
||||||
' $features)
|
' $features)
|
||||||
|
|
||||||
choice="$1"
|
preset="$1"
|
||||||
preset="$2"
|
choice="$2"
|
||||||
|
|
||||||
build_preset_list_options "$preset"
|
build_preset_list_options "$preset"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue