Module: wine Branch: master Commit: 1c94bf396f6ed41bf999ab1db36e645b9ad035e9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1c94bf396f6ed41bf999ab1db3...
Author: Ken Thomases ken@codeweavers.com Date: Thu May 5 13:53:36 2016 -0500
winemac: Add support for a high-resolution ("Retina") rendering mode.
When this Retina mode is enabled and the primary display is in the user's default configuration, Wine gets told that screen and window sizes and mouse coordinates are twice what Cocoa reports them as in its virtual coordinate system ("points"). The Windows apps then renders at that high resolution and the Mac driver blits it to screen. If the screen is actually a Retina display in a high-DPI mode, then this extra detail will be preserved. Otherwise, the rendering will be downsampled and blurry.
This is intended to be combined with increasing the Windows DPI, as via winecfg. If that is doubled to 192, then, in theory, graphical elements will remain the same visual size on screen but be rendered with finer detail. Unfortunately, many Windows programs don't correctly handle non-standard DPI so the results are not always perfect.
The registry setting to enable Retina mode is:
[HKEY_CURRENT_USER\Software\Wine\Mac Driver] "RetinaMode"="y"
Note that this setting is not looked for in the AppDefaults<exe name> key because it doesn't make sense for only some processes in a Wine session to see the high-resolution sizes and coordinates.
Signed-off-by: Ken Thomases ken@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winemac.drv/cocoa_app.m | 52 +++++++++-- dlls/winemac.drv/cocoa_display.m | 2 + dlls/winemac.drv/cocoa_event.m | 2 + dlls/winemac.drv/cocoa_opengl.h | 2 + dlls/winemac.drv/cocoa_opengl.m | 109 +++++++++++++++++++--- dlls/winemac.drv/cocoa_window.h | 6 ++ dlls/winemac.drv/cocoa_window.m | 193 +++++++++++++++++++++++++++++++++------ dlls/winemac.drv/display.c | 66 ++++++++++++- dlls/winemac.drv/gdi.c | 61 ++++++++++--- dlls/winemac.drv/macdrv.h | 1 + dlls/winemac.drv/macdrv_cocoa.h | 77 +++++++++++++++- dlls/winemac.drv/macdrv_main.c | 6 ++ dlls/winemac.drv/opengl.c | 82 ++++++++++++++++- dlls/winemac.drv/surface.c | 2 +- 14 files changed, 587 insertions(+), 74 deletions(-)
Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=1c94bf396f6ed41bf999ab...