From b292966588327bef59a102cf7b92dc88f8aed7b3 Mon Sep 17 00:00:00 2001 From: Barry Kane Date: Mon, 28 Aug 2023 02:53:31 +0100 Subject: [PATCH] Fixed window height calculations. --- source/client/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/client/main.c b/source/client/main.c index 5f30cd9..40ca09b 100644 --- a/source/client/main.c +++ b/source/client/main.c @@ -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); } }