Add missing get_api stubs.
Add hidpi_factor() support for retina displays. Fix Resize and MouseMoved events to handle retina displays. Fix inverted y position for MouseMoved events on mac. Fix initial painting on retina display.
This commit is contained in:
parent
bcda363188
commit
fd5e77f23e
6 changed files with 49 additions and 3 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")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue