This commit is contained in:
mintsuki 2022-10-04 05:29:18 +02:00
parent 25dc8a177f
commit 6f89bb0006

View File

@ -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;
}