mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02: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:
Notes:
sideshowbarker
2024-07-18 11:03:45 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/3fae7ca1139 Pull-request: https://github.com/SerenityOS/serenity/pull/8399 Reviewed-by: https://github.com/alimpfard ✅
@@ -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