From 6f89bb00062e984e0cb27409f2ac4e3484ba99ce Mon Sep 17 00:00:00 2001 From: mintsuki Date: Tue, 4 Oct 2022 05:29:18 +0200 Subject: [PATCH] Update --- backends/framebuffer.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backends/framebuffer.c b/backends/framebuffer.c index 44356db..7ac6df2 100644 --- a/backends/framebuffer.c +++ b/backends/framebuffer.c @@ -534,6 +534,11 @@ struct term_context *fbterm_init( ctx->grid_size = _ctx->rows * _ctx->cols * sizeof(struct fbterm_char); ctx->grid = _malloc(ctx->grid_size); + for (size_t i = 0; i < _ctx->rows * _ctx->cols; i++) { + ctx->grid[i].c = ' '; + ctx->grid[i].fg = ctx->text_bg; + ctx->grid[i].bg = ctx->text_bg; + } ctx->queue_size = _ctx->rows * _ctx->cols * sizeof(struct fbterm_queue_item); ctx->queue = _malloc(ctx->queue_size); @@ -578,8 +583,5 @@ struct term_context *fbterm_init( term_context_reinit(_ctx); - fbterm_clear(_ctx, true); - fbterm_full_refresh(_ctx); - return _ctx; }