1.1 --- a/src/video/cocoa/SDL_cocoamodes.m Mon Dec 05 13:17:57 2011 -0500
1.2 +++ b/src/video/cocoa/SDL_cocoamodes.m Mon Dec 05 16:45:32 2011 -0500
1.3 @@ -27,6 +27,22 @@
1.4 /* we need this for ShowMenuBar() and HideMenuBar(). */
1.5 #include <Carbon/Carbon.h>
1.6
1.7 +static inline void Cocoa_ToggleMenuBar(const BOOL show)
1.8 +{
1.9 + /* !!! FIXME: keep an eye on this.
1.10 + * ShowMenuBar/HideMenuBar is officially unavailable for 64-bit binaries.
1.11 + * It happens to work, as of 10.7, but we're going to see if
1.12 + * we can just simply do without it on newer OSes...
1.13 + */
1.14 +#if (MAC_OS_X_VERSION_MIN_REQUIRED < 1070) && !defined(__LP64__)
1.15 + if (show)
1.16 + ShowMenuBar();
1.17 + else
1.18 + HideMenuBar();
1.19 +#endif
1.20 +}
1.21 +
1.22 +
1.23 /* !!! FIXME: clean out the pre-10.6 code when it makes sense to do so. */
1.24 #define FORCE_OLD_API 0 || (MAC_OS_X_VERSION_MAX_ALLOWED < 1060)
1.25
1.26 @@ -384,7 +400,7 @@
1.27 }
1.28
1.29 if (CGDisplayIsMain(displaydata->display)) {
1.30 - ShowMenuBar();
1.31 + Cocoa_ToggleMenuBar(YES);
1.32 }
1.33 } else {
1.34 /* Put up the blanking window (a window above all other windows) */
1.35 @@ -408,7 +424,7 @@
1.36
1.37 /* Hide the menu bar so it doesn't intercept events */
1.38 if (CGDisplayIsMain(displaydata->display)) {
1.39 - HideMenuBar();
1.40 + Cocoa_ToggleMenuBar(NO);
1.41 }
1.42 }
1.43
1.44 @@ -453,7 +469,7 @@
1.45 }
1.46
1.47 }
1.48 - ShowMenuBar();
1.49 + Cocoa_ToggleMenuBar(YES);
1.50 }
1.51
1.52 #endif /* SDL_VIDEO_DRIVER_COCOA */