src/video/cocoa/SDL_cocoaopengl.m
branchSDL-ryan-batching-renderer
changeset 12350 b1a820d2f1aa
parent 11811 5d94cb6b24d3
child 12343 84eaa0636bac
     1.1 --- a/src/video/cocoa/SDL_cocoaopengl.m	Mon Oct 22 20:50:32 2018 -0400
     1.2 +++ b/src/video/cocoa/SDL_cocoaopengl.m	Thu Oct 18 11:59:48 2018 -0400
     1.3 @@ -347,10 +347,12 @@
     1.4      NSView *contentView = [windata->nswindow contentView];
     1.5      NSRect viewport = [contentView bounds];
     1.6  
     1.7 -    /* This gives us the correct viewport for a Retina-enabled view, only
     1.8 -     * supported on 10.7+. */
     1.9 -    if ([contentView respondsToSelector:@selector(convertRectToBacking:)]) {
    1.10 -        viewport = [contentView convertRectToBacking:viewport];
    1.11 +    if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
    1.12 +        /* This gives us the correct viewport for a Retina-enabled view, only
    1.13 +         * supported on 10.7+. */
    1.14 +        if ([contentView respondsToSelector:@selector(convertRectToBacking:)]) {
    1.15 +            viewport = [contentView convertRectToBacking:viewport];
    1.16 +        }
    1.17      }
    1.18  
    1.19      if (w) {