diff options
author | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2023-12-23 05:02:04 +0100 |
---|---|---|
committer | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2023-12-23 05:02:04 +0100 |
commit | 35ad38ef2f1e2488264585abaaf6aa64ae9d37a5 (patch) | |
tree | 720e49c7d142023895814d0e2ac705ca6d9481e2 | |
parent | 839891fc580f8deaf8f5b6ef3dece42e96c1acec (diff) | |
download | cuddles-35ad38ef2f1e2488264585abaaf6aa64ae9d37a5.tar.xz |
font: scroll instead of clearing screen
-rw-r--r-- | stage3/font.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/stage3/font.c b/stage3/font.c index 4fd0c1d..f2e6bea 100644 --- a/stage3/font.c +++ b/stage3/font.c @@ -124,8 +124,15 @@ static void update_cursor() cursor_y++; } - if (cursor_y >= screen_height) - font_clear_screen(); + while (cursor_y >= screen_height) { + cursor_y--; + + memcpy((void *) (u64) gfx_info->framebuffer, + (void *) (u64) gfx_info->framebuffer + gfx_info->pitch * outer_height, + gfx_info->pitch * (gfx_info->height - outer_height)); + + gfx_set_area(0, gfx_info->height-outer_height, gfx_info->width, outer_height, 0xFF000000); + } gfx_set_area(cursor_x * outer_width, cursor_y * outer_height, outer_width, outer_height, 0xFFFFFFFF); |