1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-03 05:32:13 +00:00

Kernel/Graphics: Convert type method => bool vga compatible method

We never used that type method except in initialization in
GraphicsManagement, and we used it there to query whether the device is
VGA compatible or not.
This commit is contained in:
Liav A 2021-09-21 09:43:06 +03:00 committed by Idan Horowitz
parent fb0ed2ae46
commit a9538b5879
7 changed files with 12 additions and 17 deletions

View file

@ -133,7 +133,7 @@ UNMAP_AFTER_INIT bool GraphicsManagement::determine_and_initialize_graphics_devi
// Note: If IO space is enabled, this VGA adapter is operating in VGA mode.
// Note: If no other VGA adapter is attached as m_vga_adapter, we should attach it then.
if (!m_vga_adapter && PCI::is_io_space_enabled(device_identifier.address()) && adapter->type() == GraphicsDevice::Type::VGACompatible) {
if (!m_vga_adapter && PCI::is_io_space_enabled(device_identifier.address()) && adapter->vga_compatible()) {
dbgln("Graphics adapter @ {} is operating in VGA mode", device_identifier.address());
m_vga_adapter = static_ptr_cast<VGACompatibleAdapter>(adapter);
}