[macOS] Fix rendering on retina displays with HiDPI support disabled.
(cherry picked from commit 50e2c1e184
)
This commit is contained in:
parent
455d1d3a7e
commit
84a227b663
|
@ -278,7 +278,9 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
|
||||||
NSWindow *window = (NSWindow *)[notification object];
|
NSWindow *window = (NSWindow *)[notification object];
|
||||||
CGFloat newBackingScaleFactor = [window backingScaleFactor];
|
CGFloat newBackingScaleFactor = [window backingScaleFactor];
|
||||||
CGFloat oldBackingScaleFactor = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue];
|
CGFloat oldBackingScaleFactor = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue];
|
||||||
|
if (OS_OSX::singleton->is_hidpi_allowed()) {
|
||||||
[OS_OSX::singleton->window_view setWantsBestResolutionOpenGLSurface:YES];
|
[OS_OSX::singleton->window_view setWantsBestResolutionOpenGLSurface:YES];
|
||||||
|
}
|
||||||
|
|
||||||
if (newBackingScaleFactor != oldBackingScaleFactor) {
|
if (newBackingScaleFactor != oldBackingScaleFactor) {
|
||||||
//Set new display scale and window size
|
//Set new display scale and window size
|
||||||
|
|
Loading…
Reference in New Issue