This used to default to false before Catalina, and it still does so when the application is built with XCode 10 or earlier. When building with XCode 11 or later Catalina and newer will create a high DPI GL view even if the window is low dpi. Because we don't adjust glViewport parameters (and glDrawPixels, etc) we render only to the lower left quadrant.
---
Vulkan via MoltenVK already works correctly. --- dlls/winemac.drv/cocoa_window.m | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index b6c5386469c..29ac32d6be0 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -685,6 +685,7 @@ - (void) setRetinaMode:(int)mode frame.size.width *= scale; frame.size.height *= scale; [self setFrame:frame]; + [self setWantsBestResolutionOpenGLSurface:mode]; [self updateGLContexts];
[super setRetinaMode:mode]; @@ -3575,6 +3576,7 @@ macdrv_view macdrv_create_view(CGRect rect) [view setAutoresizesSubviews:NO]; [view setAutoresizingMask:NSViewNotSizable]; [view setHidden:YES]; + [view setWantsBestResolutionOpenGLSurface:retina_on]; [nc addObserver:view selector:@selector(updateGLContexts) name:NSViewGlobalFrameDidChangeNotification
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com mailto:stefan@codeweavers.com>
---
It's been way too long since I sent a patch...
Am 11.05.2021 um 11:46 schrieb Stefan Dösinger stefan@codeweavers.com:
This used to default to false before Catalina, and it still does so when the application is built with XCode 10 or earlier. When building with XCode 11 or later Catalina and newer will create a high DPI GL view even if the window is low dpi. Because we don't adjust glViewport parameters (and glDrawPixels, etc) we render only to the lower left quadrant.
Vulkan via MoltenVK already works correctly.
dlls/winemac.drv/cocoa_window.m | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index b6c5386469c..29ac32d6be0 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -685,6 +685,7 @@ - (void) setRetinaMode:(int)mode frame.size.width *= scale; frame.size.height *= scale; [self setFrame:frame];
[self setWantsBestResolutionOpenGLSurface:mode]; [self updateGLContexts]; [super setRetinaMode:mode];
@@ -3575,6 +3576,7 @@ macdrv_view macdrv_create_view(CGRect rect) [view setAutoresizesSubviews:NO]; [view setAutoresizingMask:NSViewNotSizable]; [view setHidden:YES];
[view setWantsBestResolutionOpenGLSurface:retina_on]; [nc addObserver:view selector:@selector(updateGLContexts) name:NSViewGlobalFrameDidChangeNotification
-- 2.30.1 (Apple Git-130)
Am 11.05.2021 um 18:17 schrieb Stefan Dösinger stefan@codeweavers.com:
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com mailto:stefan@codeweavers.com>
It's been way too long since I sent a patch...
And now I sent it from my gmail address and Apple mail screwed a mailto: into that thing apparently. Today is not my day. I'll resent it cleanly after rebooting to the right macos installation...