Fixed window height calculations.

This commit is contained in:
Barra Ó Catháin 2023-08-28 02:53:31 +01:00
parent 50dcddfc56
commit b292966588
1 changed files with 4 additions and 4 deletions

View File

@ -117,8 +117,8 @@ int main (int argc, char ** argv)
// Move the windows into place:
mvwin(gameWindow, 1, 1);
mvwin(chatWindow, (height / 2) + 1 , 1);
wresize(gameWindow, (height / 2) - 1, width - 2);
wresize(chatWindow, ((height / 2) - 2) - (1 - (height % 2)), width - 2);
wresize(gameWindow, (height - 2) / 2, width - 2);
wresize(chatWindow, ((height - 3) / 2) - (1 - (height % 2)), width - 2);
wrefresh(gameWindow);
wrefresh(chatWindow);
@ -133,8 +133,8 @@ int main (int argc, char ** argv)
if (message.content[0] != '\0')
{
wprintw(gameWindow, "%s\n", message.content);
wprintw(chatWindow, "%s\n", message.content);
wprintw(gameWindow, "\n%s", message.content);
wprintw(chatWindow, "\n%s", message.content);
gnutls_record_send(tlsSession, &message, 1024);
}
}