mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:35:52 +00:00
winemac: Work around poor-quality downscaling in high-res/retina mode on macOS 10.13 and earlier.
This commit is contained in:
parent
fcd2a5f592
commit
b6f5bdb73f
|
@ -680,6 +680,22 @@ - (void) setLayerRetinaProperties:(int)mode
|
|||
[self layer].contentsScale = mode ? 2.0 : 1.0;
|
||||
[self layer].minificationFilter = mode ? kCAFilterLinear : kCAFilterNearest;
|
||||
[self layer].magnificationFilter = mode ? kCAFilterLinear : kCAFilterNearest;
|
||||
|
||||
/* On macOS 10.13 and earlier, the desired minificationFilter seems to be
|
||||
* ignored and "nearest" filtering is used, which looks terrible.
|
||||
* Enabling rasterization seems to work around this, only enable
|
||||
* it when there may be down-scaling (retina mode enabled).
|
||||
*/
|
||||
if (floor(NSAppKitVersionNumber) < 1671 /*NSAppKitVersionNumber10_14*/)
|
||||
{
|
||||
if (mode)
|
||||
{
|
||||
[self layer].shouldRasterize = YES;
|
||||
[self layer].rasterizationScale = 2.0;
|
||||
}
|
||||
else
|
||||
[self layer].shouldRasterize = NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (void) setRetinaMode:(int)mode
|
||||
|
|
Loading…
Reference in a new issue