Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Commit

Permalink
Update tty.c
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinAlavik authored Mar 24, 2024
1 parent 0ffb376 commit b8aa5d2
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions kernel/tty/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b8aa5d2

Please sign in to comment.