From 8b52d7698e4a9a5abaf730c7da1c4f865cb78f8e Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 29 Apr 2020 23:26:51 +0200 Subject: Working framebuffer from userspace... Well, it doesn't actually work. I disabled several security measures to get this working and I'll try to fix these soon. --- src/userspace/libgui/init.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/userspace/libgui/init.c') diff --git a/src/userspace/libgui/init.c b/src/userspace/libgui/init.c index 7cd1fc3..04d7ac3 100644 --- a/src/userspace/libgui/init.c +++ b/src/userspace/libgui/init.c @@ -1,4 +1,5 @@ #include +#include #include #include @@ -11,12 +12,15 @@ void gui_init() { pointers = syscall_pointers(); - return; // TODO: Fix GUI page fault vbe_width = pointers->mode_info->width; vbe_height = pointers->mode_info->height; vbe_pitch = pointers->mode_info->pitch; vbe_bpl = pointers->mode_info->bpp >> 3; - fb = pointers->mode_info->framebuffer; + + // TODO: Why tf is the kheap magic stored in the first few bytes?! + fb = (pointers->mode_info->framebuffer << 16); gui_screen_clear(); + printf("%dx%dx%d\n", vbe_width, vbe_height, vbe_bpl << 3); + printf("0x%x\n", fb); } \ No newline at end of file -- cgit v1.2.3