aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/graphics
diff options
context:
space:
mode:
authorMarvin Borner2019-09-29 20:09:56 +0200
committerMarvin Borner2019-09-29 20:09:56 +0200
commit2fb0965a68dd232a70d1616bfbd7281fc65c2b0a (patch)
tree15c16851251ef1b083deff5796a36d6c127d0035 /src/kernel/graphics
parent0936f4d7b781ca8342fa80037d836306913aa282 (diff)
Added some minor improvements
Diffstat (limited to 'src/kernel/graphics')
-rw-r--r--src/kernel/graphics/vesa.c5
-rw-r--r--src/kernel/graphics/vesa.h4
-rw-r--r--src/kernel/graphics/vga.c4
3 files changed, 9 insertions, 4 deletions
diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c
index f3fd865..f6bdba0 100644
--- a/src/kernel/graphics/vesa.c
+++ b/src/kernel/graphics/vesa.c
@@ -63,6 +63,9 @@ void set_optimal_resolution() {
struct vbe_info *info;
struct vbe_mode_info *mode_info;
+ // info = lmalloc(sizeof(struct vbe_info));
+ // mode_info = lmalloc(sizeof(struct vbe_mode_info));
+
info->signature[0] = 'V';
info->signature[1] = 'B';
info->signature[2] = 'E';
@@ -96,6 +99,8 @@ void set_optimal_resolution() {
}
}
+ // lfree(info);
+
/*if (strcmp((const char *) info->version, (const char *) 0x300) == 0) {
init();
terminal_write_string("SUCCESS!\n");
diff --git a/src/kernel/graphics/vesa.h b/src/kernel/graphics/vesa.h
index d163fb3..33272f8 100644
--- a/src/kernel/graphics/vesa.h
+++ b/src/kernel/graphics/vesa.h
@@ -11,9 +11,9 @@
struct vbe_info {
char signature[4];
uint32_t version;
- uint32_t oem;
+ far_ptr_t oem;
uint32_t capabilities;
- struct far_ptr video_modes;
+ far_ptr_t video_modes;
uint32_t video_memory;
uint32_t software_rev;
uint32_t vendor;
diff --git a/src/kernel/graphics/vga.c b/src/kernel/graphics/vga.c
index fa1f330..8fde84f 100644
--- a/src/kernel/graphics/vga.c
+++ b/src/kernel/graphics/vga.c
@@ -25,11 +25,11 @@ enum vga_color {
VGA_COLOR_WHITE = 15,
};
-static inline uint8_t vga_entry_color(enum vga_color fg, enum vga_color bg) {
+inline uint8_t vga_entry_color(enum vga_color fg, enum vga_color bg) {
return fg | bg << 4;
}
-static inline uint16_t vga_entry(unsigned char uc, uint8_t color) {
+inline uint16_t vga_entry(unsigned char uc, uint8_t color) {
return (uint16_t) uc | (uint16_t) color << 8;
}