mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
Kernel: Allow VGA-capable graphics adapters to exist with legacy VGA
If we have a VGA-capable graphics adapter that we support, we should prefer it over any legacy VGA because we wouldn't use it in legacy VGA mode in this case. This solves the problem where we would only use the legacy VGA card when both a legacy VGA card as well as a VGA-mode capable adapter is present.
This commit is contained in:
parent
ddc855ffcd
commit
fb488e2b27
6 changed files with 92 additions and 43 deletions
|
@ -99,12 +99,22 @@ public:
|
|||
operator bool() const { return !is_null(); }
|
||||
|
||||
// Disable default implementations that would use surprising integer promotion.
|
||||
bool operator==(const Address&) const = delete;
|
||||
bool operator<=(const Address&) const = delete;
|
||||
bool operator>=(const Address&) const = delete;
|
||||
bool operator<(const Address&) const = delete;
|
||||
bool operator>(const Address&) const = delete;
|
||||
|
||||
bool operator==(const Address& other) const
|
||||
{
|
||||
if (this == &other)
|
||||
return true;
|
||||
return m_seg == other.m_seg && m_bus == other.m_bus && m_device == other.m_device && m_function == other.m_function;
|
||||
}
|
||||
bool operator!=(const Address& other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
u16 seg() const { return m_seg; }
|
||||
u8 bus() const { return m_bus; }
|
||||
u8 device() const { return m_device; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue