diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-01 11:00:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-01 11:00:50 +0200 |
commit | ab76c649c510c2f090bd94773eb1f7dc85feaba3 (patch) | |
tree | e1bfea82f5b73e9f231824ef050b25abda70f316 | |
parent | 3c797248d0ae6d69e5b3337a8f42b0abe7a69c81 (diff) | |
parent | 1b6330b125042d727a65768b413de9cc7fe7003d (diff) |
Merge pull request #26958 from bruvzg/macos_hidpi_fixes
Fix hiDPI scaling support in `get_real_window_size` and `set_window.size`
-rw-r--r-- | platform/osx/os_osx.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index b45d0d80e6..7d2116ba7e 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -2270,12 +2270,12 @@ Size2 OS_OSX::get_window_size() const { Size2 OS_OSX::get_real_window_size() const { NSRect frame = [window_object frame]; - return Size2(frame.size.width, frame.size.height); + return Size2(frame.size.width, frame.size.height) * _display_scale(); } void OS_OSX::set_window_size(const Size2 p_size) { - Size2 size = p_size; + Size2 size = p_size / _display_scale(); if (get_borderless_window() == false) { // NSRect used by setFrame includes the title bar, so add it to our size.y |