From ec8bb229f018895a5bd99dd5ab4abeb34b7e61eb Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 23 Jan 2025 16:20:03 -0500 Subject: [PATCH] Actually close audiogame-manager if escape is pressed instead of trying, and failing, to launch the game. --- audiogame-manager.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 8077c31..4faa0b2 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -1057,6 +1057,7 @@ game_launcher() { done menuList+=("Donate" "Donate") menuList+=("Become a Patron" "Become a Patron") + local game="" game="$(dialog --backtitle "Audio Game Launcher" \ --clear \ --extra-button \ @@ -1065,7 +1066,7 @@ game_launcher() { --no-tags \ --menu "Please select a game to play" 0 0 0 "${menuList[@]}" --stdout)" local menuCode=$? - if [[ $menuCode -eq 1 ]]; then + if [[ $menuCode -eq 1 ]] || [[ $menuCode -eq 255 ]]; then exit 0 elif [[ $menuCode -eq 3 ]]; then documentation "$game" "$(echo "$game" | cut -d '|' -f2)"