From Stephan Huber, fixed build for OSX 10.6 and earlier

This commit is contained in:
Robert Osfield
2011-09-12 16:20:45 +00:00
parent cc37579392
commit cd6e174a5c

View File

@@ -52,7 +52,9 @@ namespace osgDarwin {
//
size_t displayBitsPerPixel( CGDirectDisplayID displayId )
{
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
return CGDisplayBitsPerPixel(displayId);
#else
CGDisplayModeRef mode = CGDisplayCopyDisplayMode(displayId);
size_t depth = 0;
@@ -65,6 +67,7 @@ size_t displayBitsPerPixel( CGDirectDisplayID displayId )
depth = 8;
return depth;
#endif
}
static inline CGRect toCGRect(NSRect nsRect)