From b8aa5d2d804800379e0a985781f49aa06865cb50 Mon Sep 17 00:00:00 2001 From: puffer Date: Sun, 24 Mar 2024 20:54:52 +0100 Subject: [PATCH] Update tty.c --- kernel/tty/tty.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/kernel/tty/tty.c b/kernel/tty/tty.c index b036afa..7df7075 100644 --- a/kernel/tty/tty.c +++ b/kernel/tty/tty.c @@ -12,16 +12,27 @@ int tty_spawn(uint8_t id) tty temp; struct nighterm_ctx context; + + char *font_data; + + vfs_op_status status; + + status = driver_read(vfs, 0x00000000, DEFAULT_FONT, &font_data); + + if (status != STATUS_OK) + return 2; + int s = nighterm_initialize(&context, - NULL, + font_data, framebuffer->address, framebuffer->width, framebuffer->height, framebuffer->pitch, framebuffer->bpp, malloc, free); + if(s != NIGHTERM_OK) - return 2; + return 3; temp.id = id; temp.context = &context;