From 6975e40f6df6c393a42676bb1063d24a11eaa124 Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Tue, 11 Sep 2007 07:31:35 +0000 Subject: [PATCH] Don't start when the screen size is lower than 50 columns. --- tty.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tty.c b/tty.c index 90c64ef..b417136 100644 --- a/tty.c +++ b/tty.c @@ -236,6 +236,15 @@ static void screen_setup(void) getmaxyx(stdscr, scrheight, scrwidth); scrwidth--; /* Don't draw in last column--this can cause scroll */ + /* don't start with fewer lines */ + if (scrheight < 50) + { + nocbreak(); + endwin(); + fprintf(stderr, "You need at least 50 lines to play tetrinet.\n"); + exit(1); + } + /* Cancel all this when we exit. */ atexit(screen_cleanup); -- 2.11.4.GIT