From 396d7d303d3bf0e796d0c817883ec1dec928352a Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 29 Apr 2020 15:26:21 +0200 Subject: Some work on the libgui --- src/kernel/syscall/actions/sys_pointers.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/kernel/syscall/actions') 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 #include #include +#include +#include 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; -- cgit v1.2.3