mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05:00
Cocoa: Fix CGDisplayModeCopyPixelEncoding cutoff
This commit is contained in:
parent
04f559e28d
commit
51e415a026
|
@ -128,7 +128,7 @@ static GLFWbool modeIsGood(CGDisplayModeRef mode)
|
||||||
if (flags & kDisplayModeStretchedFlag)
|
if (flags & kDisplayModeStretchedFlag)
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101200
|
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101100
|
||||||
CFStringRef format = CGDisplayModeCopyPixelEncoding(mode);
|
CFStringRef format = CGDisplayModeCopyPixelEncoding(mode);
|
||||||
if (CFStringCompare(format, CFSTR(IO16BitDirectPixels), 0) &&
|
if (CFStringCompare(format, CFSTR(IO16BitDirectPixels), 0) &&
|
||||||
CFStringCompare(format, CFSTR(IO32BitDirectPixels), 0))
|
CFStringCompare(format, CFSTR(IO32BitDirectPixels), 0))
|
||||||
|
@ -159,7 +159,7 @@ static GLFWvidmode vidmodeFromCGDisplayMode(CGDisplayModeRef mode,
|
||||||
result.refreshRate = (int) (time.timeScale / (double) time.timeValue);
|
result.refreshRate = (int) (time.timeScale / (double) time.timeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101200
|
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101100
|
||||||
CFStringRef format = CGDisplayModeCopyPixelEncoding(mode);
|
CFStringRef format = CGDisplayModeCopyPixelEncoding(mode);
|
||||||
if (CFStringCompare(format, CFSTR(IO16BitDirectPixels), 0) == 0)
|
if (CFStringCompare(format, CFSTR(IO16BitDirectPixels), 0) == 0)
|
||||||
{
|
{
|
||||||
|
@ -175,7 +175,7 @@ static GLFWvidmode vidmodeFromCGDisplayMode(CGDisplayModeRef mode,
|
||||||
result.blueBits = 8;
|
result.blueBits = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101200
|
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101100
|
||||||
CFRelease(format);
|
CFRelease(format);
|
||||||
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED */
|
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED */
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user