From Bob Kuehne, build fixes.

This commit is contained in:
Robert Osfield 2008-12-16 19:49:09 +00:00
parent bd4b6e9b8c
commit 3313327ab4

View File

@ -395,7 +395,7 @@ struct OSXCarbonWindowingSystemInterface : public osg::GraphicsContext::Windowin
resolution.width = CGDisplayPixelsWide(id); resolution.width = CGDisplayPixelsWide(id);
resolution.height = CGDisplayPixelsHigh(id); resolution.height = CGDisplayPixelsHigh(id);
resolution.colorDepth = CGDisplayBitsPerPixel(id); resolution.colorDepth = CGDisplayBitsPerPixel(id);
resolution.refreshRate = getDictDouble (CGDisplayCurrentMode(displayID), kCGDisplayRefreshRate); // Not tested resolution.refreshRate = getDictDouble (CGDisplayCurrentMode(id), kCGDisplayRefreshRate); // Not tested
if (resolution.refreshRate<0) resolution.refreshRate = 0; if (resolution.refreshRate<0) resolution.refreshRate = 0;
} }
@ -415,7 +415,7 @@ struct OSXCarbonWindowingSystemInterface : public osg::GraphicsContext::Windowin
CFNumberRef number_value = (CFNumberRef) CFDictionaryGetValue(refDict, key); CFNumberRef number_value = (CFNumberRef) CFDictionaryGetValue(refDict, key);
if (!number_value) // if can't get a number for the dictionary if (!number_value) // if can't get a number for the dictionary
return -1; // fail return -1; // fail
if (!CFNumberGetValue(number_value, kCFNumberDoubleType, &double_value)) // or if cant convert it if (!CFNumberGetValue(number_value, kCFNumberDoubleType, &value)) // or if cant convert it
return -1; // fail return -1; // fail
return value; // otherwise return the long value return value; // otherwise return the long value
} }
@ -438,7 +438,7 @@ struct OSXCarbonWindowingSystemInterface : public osg::GraphicsContext::Windowin
CGDirectDisplayID displayID = getDisplayID(screenIdentifier); CGDirectDisplayID displayID = getDisplayID(screenIdentifier);
CGRefreshRate refresh = resolution.refreshRate>0 ? resolution.refreshRate : getDictDouble (CGDisplayCurrentMode(displayID), kCGDisplayRefreshRate); CGRefreshRate refresh = resolution.refreshRate>0 ? resolution.refreshRate : getDictDouble (CGDisplayCurrentMode(displayID), kCGDisplayRefreshRate);
sizt_t depth = resolution.colorDepth>0 ? resolution.colorDepth : CGDisplayBitsPerPixel(displayID); size_t depth = resolution.colorDepth>0 ? resolution.colorDepth : CGDisplayBitsPerPixel(displayID);
CFDictionaryRef display_mode_values = CFDictionaryRef display_mode_values =
CGDisplayBestModeForParametersAndRefreshRate( CGDisplayBestModeForParametersAndRefreshRate(
displayID, displayID,