no more PF in kmain, but still PF in process OR corruption of fb

This commit is contained in:
2026-03-05 08:08:50 +01:00
parent a7d9e70a61
commit b9f55d89f6
10 changed files with 88 additions and 74 deletions

View File

@@ -25,6 +25,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <kernel.h>
#ifdef __cplusplus
#error "Please do not compile Flanterm as C++ code! Flanterm should be compiled as C99 or newer."
#endif
@@ -662,6 +664,17 @@ static void plot_char_unscaled_canvas(struct flanterm_context *_ctx, struct flan
}
static void plot_char_unscaled_uncanvas(struct flanterm_context *_ctx, struct flanterm_fb_char *c, size_t x, size_t y) {
if (_ctx == NULL)
{
panic(NULL, "plot_char_unscaled_uncanvas: _ctx is NULL");
}
if (c == NULL)
{
panic(NULL, "plot_char_unscaled_uncanvas: c is NULL");
}
struct flanterm_fb_context *ctx = (void *)_ctx;
if (x >= _ctx->cols || y >= _ctx->rows) {
@@ -953,6 +966,12 @@ static void draw_cursor(struct flanterm_context *_ctx) {
}
static void flanterm_fb_double_buffer_flush(struct flanterm_context *_ctx) {
if (_ctx == NULL)
{
panic(NULL, "flanterm_fb_double_buffer_flush: _ctx is NULL");
}
struct flanterm_fb_context *ctx = (void *)_ctx;
if (_ctx->cursor_enabled) {