Jelajahi Sumber

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.
Liav A 4 tahun lalu
induk
melakukan
7f3080c8f2
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      Kernel/Graphics/VGACompatibleAdapter.cpp

+ 2 - 0
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()