Skip to content

Commit

Permalink
fix macOS dpi support
Browse files Browse the repository at this point in the history
  • Loading branch information
ColleagueRiley committed Oct 7, 2024
1 parent 44d5e4d commit 1e93171
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions RGFW.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1e93171

Please sign in to comment.