Browse Source

Kernel: Use Multiboot macros instead of magic constants (#2090)

MUTLIBOOT_FRAMEBUFFER_TYPE_{RGB,EGA_TEXT} are defined in the Multiboot.h
header. Use those definitions instead of hard-coding 1 and 2.
Nathan Lanza 5 years ago
parent
commit
f4e6c4c6f0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Kernel/init.cpp

+ 1 - 1
Kernel/init.cpp

@@ -180,7 +180,7 @@ void init_stage2()
         if (bxvga_found) {
         if (bxvga_found) {
             new BXVGADevice;
             new BXVGADevice;
         } else {
         } else {
-            if (multiboot_info_ptr->framebuffer_type == 1 || multiboot_info_ptr->framebuffer_type == 2) {
+            if (multiboot_info_ptr->framebuffer_type == MULTIBOOT_FRAMEBUFFER_TYPE_RGB || multiboot_info_ptr->framebuffer_type == MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT) {
                 new MBVGADevice(
                 new MBVGADevice(
                     PhysicalAddress((u32)(multiboot_info_ptr->framebuffer_addr)),
                     PhysicalAddress((u32)(multiboot_info_ptr->framebuffer_addr)),
                     multiboot_info_ptr->framebuffer_pitch,
                     multiboot_info_ptr->framebuffer_pitch,