Browse Source

macOS: Don't apply backing scale factor when using the CoreGraphics renderer

tags/2021-05-28
ed 6 years ago
parent
commit
90d65375df
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm

+ 7
- 3
modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm View File

@@ -852,9 +852,13 @@ public:
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


Loading…
Cancel
Save