aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 138f87b..ecb6980 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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;
}