Skip to content

Commit

Permalink
fix: Retrieve scaling factor from window instead of screen
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-cooper authored and not-fl3 committed May 27, 2024
1 parent 8c29cfe commit deb13e3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/native/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ impl MacosDisplay {
unsafe fn update_dimensions(&mut self) -> Option<(i32, i32)> {
let mut d = native_display().lock().unwrap();
if d.high_dpi {
let screen: ObjcId = msg_send![self.window, screen];
let dpi_scale: f64 = msg_send![screen, backingScaleFactor];
let dpi_scale: f64 = msg_send![self.window, backingScaleFactor];
d.dpi_scale = dpi_scale as f32;
} else {
d.dpi_scale = 1.0;
Expand Down

0 comments on commit deb13e3

Please sign in to comment.