From 40e8aa9ff66d3422fee4864deb1545ddbee55aac Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 25 Sep 2022 22:00:00 +0200 Subject: [PATCH] Show something on the framebuffer on unsupported type, so that we can know something is going on --- kernel/src/render/Framebuffer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/src/render/Framebuffer.cpp b/kernel/src/render/Framebuffer.cpp index fb2e136c..bdde5a73 100644 --- a/kernel/src/render/Framebuffer.cpp +++ b/kernel/src/render/Framebuffer.cpp @@ -3,6 +3,8 @@ #include "render/Framebuffer.h" #include "assert.h" #include "bootboot.h" +#include "panic/Panic.h" +#include "string.h" Framebuffer framebuffer0; @@ -13,7 +15,11 @@ void Framebuffer::init(void* fb_address, int fb_type, int fb_scanline, int fb_wi m_fb_width = fb_width; m_fb_scanline = fb_scanline; m_fb_type = fb_type; - ASSERT(m_fb_type == FB_ARGB); // FIXME: support more framebuffer types + if (m_fb_type != FB_ARGB) + { + memset(m_fb_address, 0xe4, 500); // make it visible + panic("unsupported framebuffer"); + } } void Framebuffer::set_pixel(uint32_t x, uint32_t y, Color color)