From 1e93171d0efa5bf07272d2baaa008b48a6856a98 Mon Sep 17 00:00:00 2001 From: ColleagueRiley Date: Mon, 7 Oct 2024 18:45:27 -0400 Subject: [PATCH] fix macOS dpi support --- RGFW.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RGFW.h b/RGFW.h index 1933ffa..fb389d5 100644 --- a/RGFW.h +++ b/RGFW.h @@ -8036,11 +8036,11 @@ RGFW_UNUSED(win); /*!< if buffer rendering is not being used */ monitor.rect = RGFW_RECT((int) bounds.origin.x, (int) bounds.origin.y, (int) bounds.size.width, (int) bounds.size.height); CGSize screenSizeMM = CGDisplayScreenSize(display); - monitor.physW = screenSizeMM.width / 25.4; - monitor.physH = screenSizeMM.height / 25.4; + monitor.physW = screenSizeMM.width; + monitor.physH = screenSizeMM.height; - monitor.scaleX = (monitor.rect.w / (screenSizeMM.width)) / 2.6; - monitor.scaleY = (monitor.rect.h / (screenSizeMM.height)) / 2.6; + monitor.scaleX = ((monitor.rect.w / (screenSizeMM.width / 25.4)) / 96) + 0.25; + monitor.scaleY = ((monitor.rect.h / (screenSizeMM.height / 25.4)) / 96) + 0.25; return monitor; }