mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +00:00
Kernel: Clarify and make it easy to not use raw numbers
Let's put the PCI IDs as enums in the PCI namespace so they're free to pollute that namespace, but it's also more easier to use them.
This commit is contained in:
@@ -82,18 +82,18 @@ UNMAP_AFTER_INIT bool GraphicsManagement::determine_and_initialize_graphics_devi
|
||||
|
||||
RefPtr<GraphicsDevice> adapter;
|
||||
switch (id.vendor_id) {
|
||||
case 0x1234:
|
||||
case PCI::VendorID::QEMUOld:
|
||||
if (id.device_id == 0x1111)
|
||||
adapter = BochsGraphicsAdapter::initialize(address);
|
||||
break;
|
||||
case 0x80ee:
|
||||
case PCI::VendorID::VirtualBox:
|
||||
if (id.device_id == 0xbeef)
|
||||
adapter = BochsGraphicsAdapter::initialize(address);
|
||||
break;
|
||||
case 0x8086:
|
||||
case PCI::VendorID::Intel:
|
||||
adapter = IntelNativeGraphicsAdapter::initialize(address);
|
||||
break;
|
||||
case static_cast<u16>(PCIVendorID::VirtIO):
|
||||
case PCI::VendorID::VirtIO:
|
||||
dmesgln("Graphics: Using VirtIO console");
|
||||
adapter = Graphics::VirtIOGraphicsAdapter::initialize(address);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user