From 763ba92b8685d53bed6761243c1f4216dc0f3b19 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Sat, 17 Sep 2022 21:15:50 +0700 Subject: [PATCH] Set the terminal dimensions in col*row --- bt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bt.c b/bt.c index 077cd75..149a3b3 100644 --- a/bt.c +++ b/bt.c @@ -96,6 +96,12 @@ int main(void) { InitWindow(screenWidth, screenHeight, "basic term"); + struct winsize sz; + int result = ioctl(fds.master, TIOCGWINSZ, &sz); + sz.ws_col = 200; + sz.ws_row = 120; + result = ioctl(fds.master, TIOCSWINSZ, &sz); + SetTargetFPS(60); Font *fontDefault = load_font();