Kernel/Graphics: Ensure we set BGR format of bochs-display if supported

Instead of blindly forcing BGR format on the bochs-display device, let's
ensure we do that only on QEMU bochs-display and not on VirtualBox
graphics adapter too.
This commit is contained in:
Liav A 2021-09-27 10:37:15 +03:00 committed by Andreas Kling
commit 38bddca378
Notes: sideshowbarker 2024-07-18 03:24:42 +09:00
2 changed files with 18 additions and 1 deletions

View file

@ -25,6 +25,9 @@ class BochsGraphicsAdapter final : public GraphicsDevice
AK_MAKE_ETERNAL
friend class GraphicsManagement;
private:
TYPEDEF_DISTINCT_ORDERED_ID(u16, IndexID);
public:
static NonnullRefPtr<BochsGraphicsAdapter> initialize(PCI::Address);
virtual ~BochsGraphicsAdapter() = default;
@ -46,6 +49,8 @@ private:
explicit BochsGraphicsAdapter(PCI::Address);
IndexID index_id() const;
void set_safe_resolution();
void unblank();