From 8754542ce074bef0984f91ce1b1cd8aff9b3d5e9 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 13 Oct 2019 20:11:32 +0200 Subject: Fixed all compiler warnings --- src/kernel/graphics/graphics.h | 5 ++--- src/kernel/graphics/vesa.c | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/kernel/graphics') diff --git a/src/kernel/graphics/graphics.h b/src/kernel/graphics/graphics.h index 118fe50..baa054a 100644 --- a/src/kernel/graphics/graphics.h +++ b/src/kernel/graphics/graphics.h @@ -1,9 +1,8 @@ -#ifndef MELVIX_VGA_H -#define MELVIX_VGA_H +#ifndef MELVIX_GRAPHICS_H +#define MELVIX_GRAPHICS_H #include #include -#include "vesa.h" /** * Linked table of colors and hardware color codes diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c index cc9dd97..d19e7d8 100644 --- a/src/kernel/graphics/vesa.c +++ b/src/kernel/graphics/vesa.c @@ -15,7 +15,7 @@ void switch_to_vga() { } struct edid_data get_edid() { - /*struct edid_data *edid = umalloc(sizeof(struct edid_data)); + struct edid_data *edid = (struct edid_data *) kmalloc(sizeof(struct edid_data)); regs16_t regs; regs.ax = 0x4F15; @@ -24,9 +24,9 @@ struct edid_data get_edid() { regs.di = get_offset(edid); int32(0x10, ®s); - ufree(edid); + kfree(edid); - return *edid;*/ + return *edid; } struct vbe_mode_info *vbe_set_mode(unsigned short mode) { @@ -81,7 +81,7 @@ void set_optimal_resolution() { regs16_t regs; regs.ax = 0x4F00; regs.es = 0; - regs.di = (unsigned short) info; + regs.di = 0x2000; int32(0x10, ®s); if (regs.ax != 0x004F || strcmp(info->signature, "VESA") != 0) { -- cgit v1.2.3