mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel/Graphics: Use boot console if the subsystem is disabled
This lets us actually to initialize VirtualConsoles later on.
This commit is contained in:
parent
7ab51b6df2
commit
a0a1ac0656
Notes:
sideshowbarker
2024-07-17 11:15:08 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/a0a1ac0656 Pull-request: https://github.com/SerenityOS/serenity/pull/13923
1 changed files with 9 additions and 1 deletions
|
@ -250,8 +250,16 @@ UNMAP_AFTER_INIT bool GraphicsManagement::initialize()
|
|||
*/
|
||||
|
||||
auto graphics_subsystem_mode = kernel_command_line().graphics_subsystem_mode();
|
||||
if (graphics_subsystem_mode == CommandLine::GraphicsSubsystemMode::Disabled)
|
||||
if (graphics_subsystem_mode == CommandLine::GraphicsSubsystemMode::Disabled) {
|
||||
VERIFY(!m_console);
|
||||
// If no graphics driver was instantiated and we had a bootloader provided
|
||||
// framebuffer console we can simply re-use it.
|
||||
if (auto* boot_console = g_boot_console.load()) {
|
||||
m_console = *boot_console;
|
||||
boot_console->unref(); // Drop the leaked reference from Kernel::init()
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (graphics_subsystem_mode == CommandLine::GraphicsSubsystemMode::Limited && !multiboot_framebuffer_addr.is_null() && multiboot_framebuffer_type != MULTIBOOT_FRAMEBUFFER_TYPE_RGB) {
|
||||
dmesgln("Graphics: Using a preset resolution from the bootloader, without knowing the PCI device");
|
||||
|
|
Loading…
Reference in a new issue