|
|
@ -1672,7 +1672,7 @@ bool CDriverGL::setWindowStyle(EWindowStyle windowStyle)
|
|
|
|
// put the view in fullscreen mode, hiding the dock but enabling the menubar
|
|
|
|
// put the view in fullscreen mode, hiding the dock but enabling the menubar
|
|
|
|
// to pop up if the mouse hits the top screen border.
|
|
|
|
// to pop up if the mouse hits the top screen border.
|
|
|
|
// NOTE: withOptions:nil disables <CMD>+<Tab> application switching!
|
|
|
|
// NOTE: withOptions:nil disables <CMD>+<Tab> application switching!
|
|
|
|
#if MAC_OS_X_VERSION_10_6 > MAC_OS_X_VERSION_MAX_ALLOWED
|
|
|
|
#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
|
|
|
[containerView() enterFullScreenMode:[NSScreen mainScreen] withOptions:
|
|
|
|
[containerView() enterFullScreenMode:[NSScreen mainScreen] withOptions:
|
|
|
|
[NSDictionary dictionaryWithObjectsAndKeys:
|
|
|
|
[NSDictionary dictionaryWithObjectsAndKeys:
|
|
|
|
[NSNumber numberWithInt:
|
|
|
|
[NSNumber numberWithInt:
|
|
|
@ -1776,7 +1776,8 @@ bool CDriverGL::setMode(const GfxMode& mode)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(NL_OS_MAC) && (MAC_OS_X_VERSION_10_6 > MAC_OS_X_VERSION_MAX_ALLOWED)
|
|
|
|
#if defined(NL_OS_MAC) && defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// helper to extract bits per pixel value from screen mode, only 16 or 32 bits
|
|
|
|
/// helper to extract bits per pixel value from screen mode, only 16 or 32 bits
|
|
|
|
static int bppFromDisplayMode(CGDisplayModeRef mode)
|
|
|
|
static int bppFromDisplayMode(CGDisplayModeRef mode)
|
|
|
@ -1794,7 +1795,7 @@ static int bppFromDisplayMode(CGDisplayModeRef mode)
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#elif defined(NL_OS_MAC) && (MAC_OS_X_VERSION_10_6 < MAC_OS_X_VERSION_MAX_ALLOWED)
|
|
|
|
#elif defined(NL_OS_MAC)
|
|
|
|
|
|
|
|
|
|
|
|
long GetDictionaryLong(CFDictionaryRef theDict, const void* key)
|
|
|
|
long GetDictionaryLong(CFDictionaryRef theDict, const void* key)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1858,7 +1859,7 @@ bool CDriverGL::getModes(std::vector<GfxMode> &modes)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CGDirectDisplayID dspy = display[i];
|
|
|
|
CGDirectDisplayID dspy = display[i];
|
|
|
|
|
|
|
|
|
|
|
|
#if MAC_OS_X_VERSION_10_6 > MAC_OS_X_VERSION_MAX_ALLOWED
|
|
|
|
#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
|
|
|
CFArrayRef modeList = CGDisplayCopyAllDisplayModes(dspy, NULL);
|
|
|
|
CFArrayRef modeList = CGDisplayCopyAllDisplayModes(dspy, NULL);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
CFArrayRef modeList = CGDisplayAvailableModes(dspy);
|
|
|
|
CFArrayRef modeList = CGDisplayAvailableModes(dspy);
|
|
|
@ -1872,7 +1873,7 @@ bool CDriverGL::getModes(std::vector<GfxMode> &modes)
|
|
|
|
|
|
|
|
|
|
|
|
for (CFIndex j = 0; j < CFArrayGetCount(modeList); ++j)
|
|
|
|
for (CFIndex j = 0; j < CFArrayGetCount(modeList); ++j)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#if MAC_OS_X_VERSION_10_6 > MAC_OS_X_VERSION_MAX_ALLOWED
|
|
|
|
#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
|
|
|
CGDisplayModeRef mode = (CGDisplayModeRef)CFArrayGetValueAtIndex(modeList, j);
|
|
|
|
CGDisplayModeRef mode = (CGDisplayModeRef)CFArrayGetValueAtIndex(modeList, j);
|
|
|
|
uint8 bpp = bppFromDisplayMode(mode);
|
|
|
|
uint8 bpp = bppFromDisplayMode(mode);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
@ -1882,7 +1883,7 @@ bool CDriverGL::getModes(std::vector<GfxMode> &modes)
|
|
|
|
|
|
|
|
|
|
|
|
if (bpp >= 16)
|
|
|
|
if (bpp >= 16)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#if MAC_OS_X_VERSION_10_6 > MAC_OS_X_VERSION_MAX_ALLOWED
|
|
|
|
#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
|
|
|
uint16 w = CGDisplayModeGetWidth(mode);
|
|
|
|
uint16 w = CGDisplayModeGetWidth(mode);
|
|
|
|
uint16 h = CGDisplayModeGetHeight(mode);
|
|
|
|
uint16 h = CGDisplayModeGetHeight(mode);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|