Skip to content

Commit

Permalink
Cocoa Port: Fix mixed retina/non-retina displays bug
Browse files Browse the repository at this point in the history
  • Loading branch information
BayLee4 committed Oct 10, 2024
1 parent 8fa0aff commit a0386e5
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,15 @@ - (void)windowWillClose:(NSNotification *)notification
- (void)windowDidChangeScreen:(NSNotification *)notification
{
[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)
Expand Down

0 comments on commit a0386e5

Please sign in to comment.