diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-01-19 11:27:47 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-01-19 11:27:47 +0100 |
commit | b6f3bfa76811db8c249af08066bfb37bb1385165 (patch) | |
tree | 70534d46cd377ef393571bd84a449b4e6d7d0044 /src/lib.rs | |
parent | bcda3631887cf84f09f418946c462211cd7a540c (diff) | |
parent | 213f8b85346fda29fa18d03333ca9075b3a74707 (diff) | |
download | glutin-b6f3bfa76811db8c249af08066bfb37bb1385165.tar.gz glutin-b6f3bfa76811db8c249af08066bfb37bb1385165.zip |
Merge pull request #211 from glennw/upstream-fixes
Upstream of various fixes and features (details below)
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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")] |