From c98686bea63ce8025e49af09169987862b60878b Mon Sep 17 00:00:00 2001 From: puffer Date: Sun, 24 Mar 2024 20:52:59 +0100 Subject: [PATCH] Update tty.c --- kernel/tty/tty.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/kernel/tty/tty.c b/kernel/tty/tty.c index 4b2e7eb..b036afa 100644 --- a/kernel/tty/tty.c +++ b/kernel/tty/tty.c @@ -11,6 +11,20 @@ int tty_spawn(uint8_t id) return 1; tty temp; + struct nighterm_ctx context; + int s = nighterm_initialize(&context, + NULL, + framebuffer->address, + framebuffer->width, + framebuffer->height, + framebuffer->pitch, + framebuffer->bpp, + malloc, free); + if(s != NIGHTERM_OK) + return 2; - + temp.id = id; + temp.context = &context; + ttys[id] = &temp; + return 0; }