Changeset 10622
- Timestamp:
- 10/10/09 11:20:39 (4 years ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osgViewer/DarwinUtils.mm (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgViewer/DarwinUtils.mm
r10417 r10622 17 17 } 18 18 19 -(void) show: ( ID) data;20 -(void) hide: ( ID) data;19 -(void) show: (id) data; 20 -(void) hide: (id) data; 21 21 22 22 @end … … 26 26 27 27 28 -(void) hide:( ID) data28 -(void) hide:(id) data 29 29 { 30 30 OSErr error = SetSystemUIMode(kUIModeAllHidden, kUIOptionAutoShowMenuBar); … … 35 35 36 36 37 -(void) show:( ID) data37 -(void) show:(id) data 38 38 { 39 39 OSErr error = SetSystemUIMode(kUIModeNormal, 0); … … 282 282 resolutionList.clear(); 283 283 284 CGDirectDisplayID display ID= getDisplayID(screenIdentifier);285 CFArrayRef availableModes = CGDisplayAvailableModes(display ID);284 CGDirectDisplayID displayid = getDisplayID(screenIdentifier); 285 CFArrayRef availableModes = CGDisplayAvailableModes(displayid); 286 286 unsigned int numberOfAvailableModes = CFArrayGetCount(availableModes); 287 287 for (unsigned int i=0; i<numberOfAvailableModes; ++i) { … … 327 327 bool DarwinWindowingSystemInterface::setScreenResolutionImpl(const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, unsigned int width, unsigned int height) 328 328 { 329 CGDirectDisplayID display ID= getDisplayID(screenIdentifier);329 CGDirectDisplayID displayid = getDisplayID(screenIdentifier); 330 330 331 331 // add next line and on following line replace hard coded depth and refresh rate 332 CGRefreshRate refresh = getDictDouble (CGDisplayCurrentMode(display ID), kCGDisplayRefreshRate);332 CGRefreshRate refresh = getDictDouble (CGDisplayCurrentMode(displayid), kCGDisplayRefreshRate); 333 333 CFDictionaryRef display_mode_values = 334 334 CGDisplayBestModeForParametersAndRefreshRate( 335 display ID,336 CGDisplayBitsPerPixel(display ID),335 displayid, 336 CGDisplayBitsPerPixel(displayid), 337 337 width, height, 338 338 refresh, … … 340 340 341 341 342 CGDisplaySwitchToMode(display ID, display_mode_values);342 CGDisplaySwitchToMode(displayid, display_mode_values); 343 343 return true; 344 344 } … … 351 351 getScreenResolution(screenIdentifier, width, height); 352 352 353 CGDirectDisplayID display ID= getDisplayID(screenIdentifier);353 CGDirectDisplayID displayid = getDisplayID(screenIdentifier); 354 354 355 355 // add next line and on following line replace hard coded depth and refresh rate 356 356 CFDictionaryRef display_mode_values = 357 357 CGDisplayBestModeForParametersAndRefreshRate( 358 display ID,359 CGDisplayBitsPerPixel(display ID),358 displayid, 359 CGDisplayBitsPerPixel(displayid), 360 360 width, height, 361 361 refreshRate, … … 364 364 365 365 if (success) 366 CGDisplaySwitchToMode(display ID, display_mode_values);366 CGDisplaySwitchToMode(displayid, display_mode_values); 367 367 368 368 return (success != 0);
