From 7f3080c8f22f87cc5a7d1c952b805c4f040e2d3e Mon Sep 17 00:00:00 2001 From: Liav A Date: Sun, 16 May 2021 22:05:55 +0300 Subject: [PATCH] Kernel/Graphics: Assign console to be from VGACompatibleAdapter always If we create a VGACompatibleAdapter object with a preset framebuffer, Always assign the console so we can use it. This is useful for modesetting done by a Multiboot loader, like GRUB. --- Kernel/Graphics/VGACompatibleAdapter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Kernel/Graphics/VGACompatibleAdapter.cpp b/Kernel/Graphics/VGACompatibleAdapter.cpp index 0fd8e647ae..e8e9066ab2 100644 --- a/Kernel/Graphics/VGACompatibleAdapter.cpp +++ b/Kernel/Graphics/VGACompatibleAdapter.cpp @@ -51,6 +51,8 @@ UNMAP_AFTER_INIT VGACompatibleAdapter::VGACompatibleAdapter(PCI::Address address , m_framebuffer_pitch(framebuffer_pitch) { m_framebuffer_console = Graphics::FramebufferConsole::initialize(framebuffer_address, framebuffer_width, framebuffer_height, framebuffer_pitch); + // FIXME: This is a very wrong way to do this... + GraphicsManagement::the().m_console = m_framebuffer_console; } void VGACompatibleAdapter::enable_consoles()