Quartz: Only use ShowMenuBar()/HideMenuBar() for legacy OS releases. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Thu, 13 Oct 2011 14:50:47 -0400
branchSDL-1.2
changeset 59864854219a91e9
parent 5985 f617e1b7a27f
child 5987 825e1072eac6
Quartz: Only use ShowMenuBar()/HideMenuBar() for legacy OS releases.
src/video/quartz/SDL_QuartzVideo.m
     1.1 --- a/src/video/quartz/SDL_QuartzVideo.m	Thu Oct 13 12:29:03 2011 -0400
     1.2 +++ b/src/video/quartz/SDL_QuartzVideo.m	Thu Oct 13 14:50:47 2011 -0400
     1.3 @@ -574,7 +574,17 @@
     1.4              #endif
     1.5          }
     1.6          if (to_desktop) {
     1.7 -            ShowMenuBar ();
     1.8 +            /* !!! FIXME: keep an eye on this.
     1.9 +             * This API is officially unavailable for 64-bit binaries.
    1.10 +             *  It happens to work, as of 10.7, but we're going to see if
    1.11 +             *  we can just simply do without it on newer OSes...
    1.12 +             */
    1.13 +            #if (MAC_OS_X_VERSION_MIN_REQUIRED < 1070) && !defined(__LP64__)
    1.14 +            if ( !IS_LION_OR_LATER(this) ) {
    1.15 +                ShowMenuBar ();
    1.16 +            }
    1.17 +            #endif
    1.18 +
    1.19              /* Restore original screen resolution/bpp */
    1.20              QZ_RestoreDisplayMode (this);
    1.21              CGReleaseAllDisplays ();
    1.22 @@ -869,8 +879,17 @@
    1.23          [ qz_window makeKeyAndOrderFront:nil ];
    1.24      }
    1.25  
    1.26 -    /* If we don't hide menu bar, it will get events and interrupt the program */
    1.27 -    HideMenuBar ();
    1.28 +    /* !!! FIXME: keep an eye on this.
    1.29 +     * This API is officially unavailable for 64-bit binaries.
    1.30 +     *  It happens to work, as of 10.7, but we're going to see if
    1.31 +     *  we can just simply do without it on newer OSes...
    1.32 +     */
    1.33 +    #if (MAC_OS_X_VERSION_MIN_REQUIRED < 1070) && !defined(__LP64__)
    1.34 +    if ( !IS_LION_OR_LATER(this) ) {
    1.35 +        /* If we don't hide menu bar, it will get events and interrupt the program */
    1.36 +        HideMenuBar ();
    1.37 +    }
    1.38 +    #endif
    1.39  
    1.40      /* Fade in again (asynchronously) */
    1.41      if ( fade_token != kCGDisplayFadeReservationInvalidToken ) {