From Bob Kuehne, "fix for 10.6/darwin: this fix changes what i believe to be a typo in the os x darwinutils file from ID to id, the proper objective-c name for a type."
This commit is contained in:
parent
f6166d1119
commit
01b5bf97f4
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void) show: (ID) data;
|
-(void) show: (id) data;
|
||||||
-(void) hide: (ID) data;
|
-(void) hide: (id) data;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
-(void) hide:(ID) data
|
-(void) hide:(id) data
|
||||||
{
|
{
|
||||||
OSErr error = SetSystemUIMode(kUIModeAllHidden, kUIOptionAutoShowMenuBar);
|
OSErr error = SetSystemUIMode(kUIModeAllHidden, kUIOptionAutoShowMenuBar);
|
||||||
if (error) {
|
if (error) {
|
||||||
@ -34,7 +34,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-(void) show:(ID) data
|
-(void) show:(id) data
|
||||||
{
|
{
|
||||||
OSErr error = SetSystemUIMode(kUIModeNormal, 0);
|
OSErr error = SetSystemUIMode(kUIModeNormal, 0);
|
||||||
if (error) {
|
if (error) {
|
||||||
@ -281,8 +281,8 @@ void DarwinWindowingSystemInterface::enumerateScreenSettings(const osg::Graphics
|
|||||||
// Warning! This method has not been tested.
|
// Warning! This method has not been tested.
|
||||||
resolutionList.clear();
|
resolutionList.clear();
|
||||||
|
|
||||||
CGDirectDisplayID displayID = getDisplayID(screenIdentifier);
|
CGDirectDisplayID displayid = getDisplayID(screenIdentifier);
|
||||||
CFArrayRef availableModes = CGDisplayAvailableModes(displayID);
|
CFArrayRef availableModes = CGDisplayAvailableModes(displayid);
|
||||||
unsigned int numberOfAvailableModes = CFArrayGetCount(availableModes);
|
unsigned int numberOfAvailableModes = CFArrayGetCount(availableModes);
|
||||||
for (unsigned int i=0; i<numberOfAvailableModes; ++i) {
|
for (unsigned int i=0; i<numberOfAvailableModes; ++i) {
|
||||||
// look at each mode in the available list
|
// look at each mode in the available list
|
||||||
@ -326,20 +326,20 @@ bool DarwinWindowingSystemInterface::setScreenSettings(const osg::GraphicsContex
|
|||||||
/** implementation of setScreenResolution */
|
/** implementation of setScreenResolution */
|
||||||
bool DarwinWindowingSystemInterface::setScreenResolutionImpl(const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, unsigned int width, unsigned int height)
|
bool DarwinWindowingSystemInterface::setScreenResolutionImpl(const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, unsigned int width, unsigned int height)
|
||||||
{
|
{
|
||||||
CGDirectDisplayID displayID = getDisplayID(screenIdentifier);
|
CGDirectDisplayID displayid = getDisplayID(screenIdentifier);
|
||||||
|
|
||||||
// add next line and on following line replace hard coded depth and refresh rate
|
// add next line and on following line replace hard coded depth and refresh rate
|
||||||
CGRefreshRate refresh = getDictDouble (CGDisplayCurrentMode(displayID), kCGDisplayRefreshRate);
|
CGRefreshRate refresh = getDictDouble (CGDisplayCurrentMode(displayid), kCGDisplayRefreshRate);
|
||||||
CFDictionaryRef display_mode_values =
|
CFDictionaryRef display_mode_values =
|
||||||
CGDisplayBestModeForParametersAndRefreshRate(
|
CGDisplayBestModeForParametersAndRefreshRate(
|
||||||
displayID,
|
displayid,
|
||||||
CGDisplayBitsPerPixel(displayID),
|
CGDisplayBitsPerPixel(displayid),
|
||||||
width, height,
|
width, height,
|
||||||
refresh,
|
refresh,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
|
||||||
CGDisplaySwitchToMode(displayID, display_mode_values);
|
CGDisplaySwitchToMode(displayid, display_mode_values);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,20 +350,20 @@ bool DarwinWindowingSystemInterface::setScreenRefreshRateImpl(const osg::Graphic
|
|||||||
unsigned width, height;
|
unsigned width, height;
|
||||||
getScreenResolution(screenIdentifier, width, height);
|
getScreenResolution(screenIdentifier, width, height);
|
||||||
|
|
||||||
CGDirectDisplayID displayID = getDisplayID(screenIdentifier);
|
CGDirectDisplayID displayid = getDisplayID(screenIdentifier);
|
||||||
|
|
||||||
// add next line and on following line replace hard coded depth and refresh rate
|
// add next line and on following line replace hard coded depth and refresh rate
|
||||||
CFDictionaryRef display_mode_values =
|
CFDictionaryRef display_mode_values =
|
||||||
CGDisplayBestModeForParametersAndRefreshRate(
|
CGDisplayBestModeForParametersAndRefreshRate(
|
||||||
displayID,
|
displayid,
|
||||||
CGDisplayBitsPerPixel(displayID),
|
CGDisplayBitsPerPixel(displayid),
|
||||||
width, height,
|
width, height,
|
||||||
refreshRate,
|
refreshRate,
|
||||||
&success);
|
&success);
|
||||||
|
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
CGDisplaySwitchToMode(displayID, display_mode_values);
|
CGDisplaySwitchToMode(displayid, display_mode_values);
|
||||||
|
|
||||||
return (success != 0);
|
return (success != 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user