Rework desktop mode warning logic

This commit is contained in:
icenine451 2023-03-16 11:50:39 -04:00
parent 9a64723096
commit 1290966409

View file

@ -223,14 +223,14 @@ desktop_mode_warning() {
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Desktop Mode Warning" \ --title "RetroDECK Desktop Mode Warning" \
--text="You appear to be running RetroDECK in the Steam Deck's Desktop mode!\n\nSome functions of RetroDECK may not work properly in Desktop mode, such as the Steam Deck's normal controls.\n\nRetroDECK is best enjoyed in Game mode!\n\nDo you still want to proceed?") --text="You appear to be running RetroDECK in the Steam Deck's Desktop mode!\n\nSome functions of RetroDECK may not work properly in Desktop mode, such as the Steam Deck's normal controls.\n\nRetroDECK is best enjoyed in Game mode!\n\nDo you still want to proceed?")
fi rc=$? # Capture return code, as "Yes" button has no text value
fi if [[ $rc == "1" ]]; then # If any button other than "Yes" was clicked
rc=$? # Capture return code, as "Yes" button has no text value if [[ $choice == "No" ]]; then
if [[ $rc == "1" ]]; then # If any button other than "Yes" was clicked exit 1
if [[ $choice == "No" ]]; then elif [[ $choice == "Never show this again" ]]; then
exit 1 set_setting_value $rd_conf "desktop_mode_warning" "false" retrodeck # Store desktop mode warning variable for future checks
elif [[ $choice == "Never show this again" ]]; then fi
set_setting_value $rd_conf "desktop_mode_warning" "false" retrodeck # Store desktop mode warning variable for future checks fi
fi fi
fi fi
} }