narrow tolerance for very small screen

This commit is contained in:
Andrzej Rybczak
2009-08-25 03:12:18 +02:00
parent 7a85a15ff2
commit 8a9eebda26

View File

@@ -418,16 +418,15 @@ int main(int argc, char *argv[])
# endif // USE_PDCURSES
RedrawHeader = 1;
if (COLS < 20 || LINES < 5)
{
endwin();
std::cout << "Screen too small!\n";
return 1;
}
MainHeight = LINES-(Config.new_design ? 7 : 4);
if (COLS < 20 || MainHeight < 3)
{
DestroyScreen();
std::cout << "Screen is too small!\n";
exit(1);
}
if (!Config.header_visibility)
MainHeight += 2;
if (!Config.statusbar_visibility)