Make reset function more robust by also

deleting the retrodeck.cfg file.
This commit is contained in:
icenine451 2023-03-20 16:46:09 -04:00
parent 5b92ca50f6
commit 8ce300527c
3 changed files with 7 additions and 5 deletions

@ -1 +1 @@
Subproject commit 717b78093797270877ec416e58082f1c71d435d8
Subproject commit 0b1cfb79e591e10488a3262d6b38db843c39a409

View file

@ -53,7 +53,7 @@ https://retrodeck.net
echo "Available options are: retroarch citra dolphin duckstation melonds pcsx2 ppsspp primehack rpcs3 xemu yuzu all-emulators"
read -p "Please enter the emulator you would like to reset: " emulator
if [[ "$emulator" =~ ^(retroarch|citra|dolphin|duckstation|melonds|pcsx2|ppsspp|primehack|rpcs3|xemu|yuzu|all-emulators)$ ]]; then
read -p "You are about to reset $emulator to default settings. Press 'y' to continue, 'n' to stop: " response
read -p "You are about to reset $emulator to default settings. Enter 'y' to continue, 'n' to stop: " response
if [[ $response == [yY] ]]; then
cli_emulator_reset $emulator
read -p "The process has been completed, press Enter key to start RetroDECK."
@ -69,7 +69,7 @@ https://retrodeck.net
;;
--reset-tools*)
echo "You are about to reset the RetroDECK tools."
read -p "Press 'y' to continue, 'n' to stop: " response
read -p "Enter 'y' to continue, 'n' to stop: " response
if [[ $response == [yY] ]]; then
tools_init
read -p "The process has been completed, press Enter key to start RetroDECK."
@ -81,9 +81,10 @@ https://retrodeck.net
;;
--reset-retrodeck*)
echo "You are about to reset RetroDECK completely!"
read -p "Press 'y' to continue, 'n' to stop: " response
read -p "Enter 'y' to continue, 'n' to stop: " response
if [[ $response == [yY] ]]; then
rm -f "$lockfile"
rm -f "$rd_conf"
read -p "The process has been completed, press Enter key to start the initial RetroDECK setup process."
shift # Continue launch after previous command is finished
else

View file

@ -165,8 +165,9 @@ configurator_reset_dialog() {
zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Configurator Utility - Reset RetroDECK" \
--text="You are resetting RetroDECK to its default state.\n\nAfter the process is complete you will need to exit RetroDECK and run it again, where you will go through the initial setup process again."
--text="You are resetting RetroDECK to its default state.\n\nAfter the process is complete you will need to exit RetroDECK and run it again, where you will go through the initial setup process."
rm -f "$lockfile"
rm -f "$rd_conf"
configurator_process_complete_dialog "resetting RetroDECK"
;;