From f4e6c4c6f002bbb8b7ded0101be78b9ffa00fe8f Mon Sep 17 00:00:00 2001 From: Nathan Lanza Date: Mon, 4 May 2020 03:52:04 -0400 Subject: [PATCH] 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. --- Kernel/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/init.cpp b/Kernel/init.cpp index b043b40c87..32cfacd715 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -180,7 +180,7 @@ void init_stage2() if (bxvga_found) { new BXVGADevice; } 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( PhysicalAddress((u32)(multiboot_info_ptr->framebuffer_addr)), multiboot_info_ptr->framebuffer_pitch,