Skip to content

Commit

Permalink
macOS: Don't apply backing scale factor when using the CoreGraphics r…
Browse files Browse the repository at this point in the history
…enderer
  • Loading branch information
ed95 committed Mar 22, 2019
1 parent 3d8acd8 commit 90d6537
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -852,9 +852,13 @@ void drawRect (NSRect r)
float displayScale = 1.0f;

#if defined (MAC_OS_X_VERSION_10_7) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7)
NSScreen* screen = [[view window] screen];
if ([screen respondsToSelector: @selector (backingScaleFactor)])
displayScale = (float) screen.backingScaleFactor;
if (! usingCoreGraphics)
{
NSScreen* screen = [[view window] screen];

if ([screen respondsToSelector: @selector (backingScaleFactor)])
displayScale = (float) screen.backingScaleFactor;
}
#endif

#if USE_COREGRAPHICS_RENDERING && JUCE_COREGRAPHICS_RENDER_WITH_MULTIPLE_PAINT_CALLS
Expand Down

0 comments on commit 90d6537

Please sign in to comment.