Cocoa Port: Fix mixed retina/non-retina displays bug
This commit is contained in:
parent
8fa0affab1
commit
a0386e535c
|
@ -1465,6 +1465,15 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
||||||
- (void)windowDidChangeScreen:(NSNotification *)notification
|
- (void)windowDidChangeScreen:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
[self updateDisplayID];
|
[self updateDisplayID];
|
||||||
|
#if defined(MAC_OS_X_VERSION_10_7) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7)
|
||||||
|
NSScreen *screen = [[self window] screen];
|
||||||
|
// Set up the scaling factor if this is a Retina window
|
||||||
|
if ([screen respondsToSelector:@selector(backingScaleFactor)])
|
||||||
|
{
|
||||||
|
float scaleFactor = [screen backingScaleFactor];
|
||||||
|
[[[self view] cdsVideoOutput] clientDisplay3DView]->Get3DPresenter()->SetScaleFactor(scaleFactor);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(MAC_OS_X_VERSION_10_7) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7)
|
#if defined(MAC_OS_X_VERSION_10_7) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7)
|
||||||
|
|
Loading…
Reference in New Issue