From 57b3ff8d9874486c04ec92a774a6c451af7f4146 Mon Sep 17 00:00:00 2001 From: yubiuser Date: Sun, 23 Feb 2025 22:16:55 +0100 Subject: [PATCH] Only exit for small screen sizes during startup Signed-off-by: yubiuser --- padd.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/padd.sh b/padd.sh index 329e597..2034f28 100755 --- a/padd.sh +++ b/padd.sh @@ -1323,9 +1323,7 @@ SizeChecker(){ height=10 # Below Pico. Gives you nothing... else - # Nothing is this small, sorry - printf "%b" "${check_box_bad} Error!\n PADD isn't\n for ants!\n" - exit 1 + padd_size="ants" fi # Center the output (default position) @@ -1537,6 +1535,12 @@ ShowVersion() { StartupRoutine(){ + if [ "$1" = "ants" ]; then + # If the screen is too small from the beginning, exit + printf "%b" "${check_box_bad} Error!\n PADD isn't\n for ants!\n" + exit 1 + fi + # Clear the screen and move cursor to (0,0). # This mimics the 'clear' command. # https://vt100.net/docs/vt510-rm/ED.html