Show something on the framebuffer on unsupported type, so that we can know something is going on
This commit is contained in:
parent
07d6fe388d
commit
40e8aa9ff6
@ -3,6 +3,8 @@
|
|||||||
#include "render/Framebuffer.h"
|
#include "render/Framebuffer.h"
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
#include "bootboot.h"
|
#include "bootboot.h"
|
||||||
|
#include "panic/Panic.h"
|
||||||
|
#include "string.h"
|
||||||
|
|
||||||
Framebuffer framebuffer0;
|
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_width = fb_width;
|
||||||
m_fb_scanline = fb_scanline;
|
m_fb_scanline = fb_scanline;
|
||||||
m_fb_type = fb_type;
|
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)
|
void Framebuffer::set_pixel(uint32_t x, uint32_t y, Color color)
|
||||||
|
Loading…
Reference in New Issue
Block a user