aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/syscall/actions
diff options
context:
space:
mode:
authorMarvin Borner2020-04-29 15:26:21 +0200
committerMarvin Borner2020-04-29 15:26:21 +0200
commit396d7d303d3bf0e796d0c817883ec1dec928352a (patch)
tree69d79c31ca94da7aa3089709be08f1d959023472 /src/kernel/syscall/actions
parent4f3c75d23188bd480739d6d1514543c95cfe3399 (diff)
Some work on the libgui
Diffstat (limited to 'src/kernel/syscall/actions')
-rw-r--r--src/kernel/syscall/actions/sys_pointers.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/kernel/syscall/actions/sys_pointers.c b/src/kernel/syscall/actions/sys_pointers.c
index 1a2d8f7..ced95de 100644
--- a/src/kernel/syscall/actions/sys_pointers.c
+++ b/src/kernel/syscall/actions/sys_pointers.c
@@ -2,16 +2,27 @@
#include <kernel/graphics/vesa.h>
#include <kernel/fs/load.h>
#include <kernel/memory/alloc.h>
+#include <kernel/memory/paging.h>
+#include <kernel/tasks/process.h>
struct pointers {
- uint8_t *fb;
+ struct vbe_mode_info *current_mode_info;
struct font *font;
};
uint32_t sys_pointers()
{
- struct pointers *pointers = kmalloc(sizeof(struct pointers));
- pointers->fb = fb;
+ struct vbe_mode_info *ret = (struct vbe_mode_info *)umalloc(sizeof(struct vbe_mode_info));
+ ret->attributes = current_mode_info->attributes;
+ ret->pitch = current_mode_info->pitch;
+ ret->width = current_mode_info->width;
+ ret->height = current_mode_info->height;
+ ret->bpp = current_mode_info->bpp;
+ ret->memory_model = current_mode_info->memory_model;
+ ret->framebuffer = current_mode_info->framebuffer;
+
+ struct pointers *pointers = umalloc(sizeof(struct pointers));
+ pointers->current_mode_info = ret;
pointers->font = font;
return pointers;