Skip to content

Commit

Permalink
macOS: Fixed a compatibility issue with versions < 10.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ed95 committed Jul 15, 2019
1 parent 6881795 commit 251d116
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -807,7 +807,12 @@ void drawRect (NSRect r)
if (r.size.width < 1.0f || r.size.height < 1.0f)
return;

auto cg = (CGContextRef) [[NSGraphicsContext currentContext] CGContext];
auto cg = (CGContextRef) [[NSGraphicsContext currentContext]
#if (defined (MAC_OS_X_VERSION_10_10) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10)
CGContext];
#else
graphicsPort];
#endif

if (! component.isOpaque())
CGContextClearRect (cg, CGContextGetClipBoundingBox (cg));
Expand Down

0 comments on commit 251d116

Please sign in to comment.