|
@@ -31,9 +31,6 @@
|
|
#include <CoreVideo/CVBase.h>
|
|
#include <CoreVideo/CVBase.h>
|
|
#include <CoreVideo/CVDisplayLink.h>
|
|
#include <CoreVideo/CVDisplayLink.h>
|
|
|
|
|
|
-/* we need this for ShowMenuBar() and HideMenuBar(). */
|
|
|
|
-#include <Carbon/Carbon.h>
|
|
|
|
-
|
|
|
|
/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
|
|
/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
|
|
#include <AvailabilityMacros.h>
|
|
#include <AvailabilityMacros.h>
|
|
|
|
|
|
@@ -45,23 +42,6 @@
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
-static void
|
|
|
|
-Cocoa_ToggleMenuBar(const BOOL show)
|
|
|
|
-{
|
|
|
|
- /* !!! FIXME: keep an eye on this.
|
|
|
|
- * ShowMenuBar/HideMenuBar is officially unavailable for 64-bit binaries.
|
|
|
|
- * It happens to work, as of 10.7, but we're going to see if
|
|
|
|
- * we can just simply do without it on newer OSes...
|
|
|
|
- */
|
|
|
|
-#if (MAC_OS_X_VERSION_MIN_REQUIRED < 1070) && !defined(__LP64__)
|
|
|
|
- if (show) {
|
|
|
|
- ShowMenuBar();
|
|
|
|
- } else {
|
|
|
|
- HideMenuBar();
|
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static int
|
|
static int
|
|
CG_SetError(const char *prefix, CGDisplayErr result)
|
|
CG_SetError(const char *prefix, CGDisplayErr result)
|
|
{
|
|
{
|
|
@@ -497,7 +477,7 @@ Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdp
|
|
CFRelease(dmOptions);
|
|
CFRelease(dmOptions);
|
|
} else
|
|
} else
|
|
#endif
|
|
#endif
|
|
- if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) {
|
|
|
|
|
|
+ {
|
|
// fallback for 10.7
|
|
// fallback for 10.7
|
|
scaleFactor = [screen backingScaleFactor];
|
|
scaleFactor = [screen backingScaleFactor];
|
|
displayNativeSize.width = displayNativeSize.width * scaleFactor;
|
|
displayNativeSize.width = displayNativeSize.width * scaleFactor;
|
|
@@ -646,10 +626,6 @@ Cocoa_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
|
|
} else {
|
|
} else {
|
|
CGDisplayRelease(displaydata->display);
|
|
CGDisplayRelease(displaydata->display);
|
|
}
|
|
}
|
|
-
|
|
|
|
- if (CGDisplayIsMain(displaydata->display)) {
|
|
|
|
- Cocoa_ToggleMenuBar(YES);
|
|
|
|
- }
|
|
|
|
} else {
|
|
} else {
|
|
/* Put up the blanking window (a window above all other windows) */
|
|
/* Put up the blanking window (a window above all other windows) */
|
|
if (CGDisplayIsMain(displaydata->display)) {
|
|
if (CGDisplayIsMain(displaydata->display)) {
|
|
@@ -669,11 +645,6 @@ Cocoa_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
|
|
CG_SetError("CGDisplaySwitchToMode()", result);
|
|
CG_SetError("CGDisplaySwitchToMode()", result);
|
|
goto ERR_NO_SWITCH;
|
|
goto ERR_NO_SWITCH;
|
|
}
|
|
}
|
|
-
|
|
|
|
- /* Hide the menu bar so it doesn't intercept events */
|
|
|
|
- if (CGDisplayIsMain(displaydata->display)) {
|
|
|
|
- Cocoa_ToggleMenuBar(NO);
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/* Fade in again (asynchronously) */
|
|
/* Fade in again (asynchronously) */
|
|
@@ -720,7 +691,6 @@ Cocoa_QuitModes(_THIS)
|
|
CFRelease(mode->modes);
|
|
CFRelease(mode->modes);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- Cocoa_ToggleMenuBar(YES);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
#endif /* SDL_VIDEO_DRIVER_COCOA */
|
|
#endif /* SDL_VIDEO_DRIVER_COCOA */
|