Stefan Dösinger : winemac.drv: Set view.WantsBestResolutionOpenGLSurface.

Alexandre Julliard julliard at winehq.org
Wed May 12 15:44:28 CDT 2021


Module: wine
Branch: master
Commit: 004b1179e96648495fc0b7ff6711cc990a8a03bb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=004b1179e96648495fc0b7ff6711cc990a8a03bb

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Wed May 12 11:55:12 2021 +0200

winemac.drv: Set view.WantsBestResolutionOpenGLSurface.

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.

Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
         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




More information about the wine-cvs mailing list