aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 12a908c..fb551c8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -621,6 +621,13 @@ impl Window {
pub fn set_cursor(&self, cursor: MouseCursor) {
self.window.set_cursor(cursor);
}
+
+ /// Returns the ratio between the backing framebuffer resolution and the
+ /// window size in screen pixels. This is typically one for a normal display
+ /// and two for a retina display.
+ pub fn hidpi_factor(&self) -> f32 {
+ self.window.hidpi_factor()
+ }
}
#[cfg(feature = "window")]