From 10946d3594a13c87ac00e12586716ae79d087aac Mon Sep 17 00:00:00 2001 From: jack-cooper Date: Mon, 27 May 2024 13:32:57 +0100 Subject: [PATCH] fix: Retrieve scaling factor from window instead of screen --- src/native/macos.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/native/macos.rs b/src/native/macos.rs index f9eb56e3..b889196c 100644 --- a/src/native/macos.rs +++ b/src/native/macos.rs @@ -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;