Update TextRenderer to use kerrorln
This commit is contained in:
parent
f98a45aefe
commit
d418842a48
@ -1,7 +1,10 @@
|
||||
#define MODULE "text"
|
||||
|
||||
#include "render/TextRenderer.h"
|
||||
#include "bootboot.h"
|
||||
#include "init/InitRD.h"
|
||||
#include "io/Serial.h"
|
||||
#include "log/Log.h"
|
||||
#include "psf2.h"
|
||||
#include "render/Framebuffer.h"
|
||||
#include "std/stdio.h"
|
||||
@ -17,16 +20,16 @@ static uint32_t ypos = 0;
|
||||
|
||||
bool TextRenderer::try_initialize()
|
||||
{
|
||||
InitRD::File font_file = InitRD::find_file("boot/font.psf");
|
||||
InitRD::File font_file = InitRD::open("boot/font.psf");
|
||||
if (!font_file.addr)
|
||||
{
|
||||
Serial::println("Failed to load boot/font.psf from initrd");
|
||||
kerrorln("Failed to load boot/font.psf from initrd");
|
||||
return false;
|
||||
}
|
||||
font = (psf2_t*)font_file.addr;
|
||||
if (font->magic != PSF_FONT_MAGIC)
|
||||
{
|
||||
Serial::println("Font magic does not match PSF font magic");
|
||||
kerrorln("Font magic does not match PSF font magic: %x", font->magic);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user