diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -197,6 +197,7 @@ pub enum MouseCursor { #[allow(missing_docs)] #[derive(Debug)] pub struct PixelFormat { + pub hardware_accelerated: bool, pub red_bits: u8, pub green_bits: u8, pub blue_bits: u8, @@ -286,6 +287,10 @@ impl<'a> BuilderAttribs<'a> { // TODO: do this more properly for (id, format) in iter { + if !format.hardware_accelerated { + continue; + } + if format.red_bits + format.green_bits + format.blue_bits < self.color_bits.unwrap_or(0) { continue; } |