summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2019-10-14 11:30:27 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2020-02-11 12:04:04 +0100
commitd5df1b651c9f2c21a38ceb4fd00e8844e66ef01c (patch)
tree8b4cdc98a2ceea494ee3a69bd387cd7c359ff78f /platform
parent561b431d85314000fe70d42e39713e5da394c3b5 (diff)
Improve HiDPI handling, fix incorrect window viewport clipping.
Diffstat (limited to 'platform')
-rw-r--r--platform/osx/os_osx.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 5d2bc5172f..5fd663e51e 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -345,6 +345,12 @@ static NSCursor *cursorFromSelector(SEL selector, SEL fallback = nil) {
OS_OSX::singleton->window_size.width = fbRect.size.width * newDisplayScale;
OS_OSX::singleton->window_size.height = fbRect.size.height * newDisplayScale;
+#if defined(VULKAN_ENABLED)
+ if (OS_OSX::singleton->video_driver_index == OS::VIDEO_DRIVER_VULKAN) {
+ CALayer* layer = [OS_OSX::singleton->window_view layer];
+ layer.contentsScale = OS_OSX::singleton->_display_scale();
+ }
+#endif
//Update context
if (OS_OSX::singleton->main_loop) {
//Force window resize event