Actually close audiogame-manager if escape is pressed instead of trying, and failing, to launch the game.

This commit is contained in:
Storm Dragon 2025-01-23 16:20:03 -05:00
parent 3d95cefb02
commit ec8bb229f0

View File

@ -1057,6 +1057,7 @@ game_launcher() {
done done
menuList+=("Donate" "Donate") menuList+=("Donate" "Donate")
menuList+=("Become a Patron" "Become a Patron") menuList+=("Become a Patron" "Become a Patron")
local game=""
game="$(dialog --backtitle "Audio Game Launcher" \ game="$(dialog --backtitle "Audio Game Launcher" \
--clear \ --clear \
--extra-button \ --extra-button \
@ -1065,7 +1066,7 @@ game_launcher() {
--no-tags \ --no-tags \
--menu "Please select a game to play" 0 0 0 "${menuList[@]}" --stdout)" --menu "Please select a game to play" 0 0 0 "${menuList[@]}" --stdout)"
local menuCode=$? local menuCode=$?
if [[ $menuCode -eq 1 ]]; then if [[ $menuCode -eq 1 ]] || [[ $menuCode -eq 255 ]]; then
exit 0 exit 0
elif [[ $menuCode -eq 3 ]]; then elif [[ $menuCode -eq 3 ]]; then
documentation "$game" "$(echo "$game" | cut -d '|' -f2)" documentation "$game" "$(echo "$game" | cut -d '|' -f2)"