aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/graphics
diff options
context:
space:
mode:
authorMarvin Borner2020-04-16 19:06:33 +0200
committerMarvin Borner2020-04-16 19:06:33 +0200
commit4014a36377ff69f6433e7b0af2144bc3a7d29ca7 (patch)
tree9440ac3749d406c6df9917d4bb3a19de6ea99655 /src/kernel/graphics
parentfc26e84ef8c6255926811fe639e3e466b756e581 (diff)
Many fix attempts for the divide by zero exception
Diffstat (limited to 'src/kernel/graphics')
-rw-r--r--src/kernel/graphics/vesa.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c
index 490c8ea..ca190ad 100644
--- a/src/kernel/graphics/vesa.c
+++ b/src/kernel/graphics/vesa.c
@@ -119,13 +119,9 @@ void set_optimal_resolution()
continue;
}
- log("Found mode: (0x%x) %dx%dx%d", *mode, mode_info->width, mode_info->height,
- mode_info->bpp);
-
if (mode_info->width > vbe_width ||
(mode_info->width == vbe_width && (mode_info->bpp >> 3) > vbe_bpl)) {
// if (mode_info->bpp == 32) { // Force specific bpp for debugging
- // (float) mode_info->width / (float) mode_info->height < 2.0 &&) {
highest = *mode;
vbe_width = mode_info->width;
vbe_height = mode_info->height;
@@ -139,7 +135,6 @@ void set_optimal_resolution()
kfree(video_modes);
if (highest == 0) {
- log("Mode detection failed!\nTrying common modes...");
vga_log("Mode detection failed!");
vga_log("Trying common modes...");
struct vbe_mode_info *mode_info;
@@ -211,7 +206,6 @@ void set_optimal_resolution()
info("Successfully switched to video mode!");
log("Using mode: (0x%x) %dx%dx%d", highest, vbe_width, vbe_height, vbe_bpl << 3);
- debug("Using mode: %dx%dx%d", vbe_width, vbe_height, vbe_bpl << 3);
}
const uint32_t default_text_color = vesa_white;
@@ -375,4 +369,4 @@ void vesa_set_color(uint32_t color)
{
vesa_convert_color(terminal_color, color);
vesa_convert_color(terminal_background, default_background_color);
-} \ No newline at end of file
+}