src/video/quartz/SDL_QuartzVideo.m
branchSDL-1.2
changeset 4139 568c9b3c0167
parent 4123 9d90d7765fa7
child 4159 a1b03ba2fcd0
equal deleted inserted replaced
4138:b1fd24d62e55 4139:568c9b3c0167
   186     display_id = kCGDirectMainDisplay;
   186     display_id = kCGDirectMainDisplay;
   187     save_mode  = CGDisplayCurrentMode    (display_id);
   187     save_mode  = CGDisplayCurrentMode    (display_id);
   188     mode_list  = CGDisplayAvailableModes (display_id);
   188     mode_list  = CGDisplayAvailableModes (display_id);
   189     palette    = CGPaletteCreateDefaultColorPalette ();
   189     palette    = CGPaletteCreateDefaultColorPalette ();
   190 
   190 
       
   191     /* Allow environment override of screensaver disable. */
   191     env = SDL_getenv("SDL_VIDEO_ALLOW_SCREENSAVER");
   192     env = SDL_getenv("SDL_VIDEO_ALLOW_SCREENSAVER");
   192     allow_screensaver = ( env && SDL_atoi(env) ) ? YES : NO;
   193     if ( env ) {
       
   194         allow_screensaver = SDL_atoi(env);
       
   195     } else {
       
   196 #ifdef SDL_VIDEO_DISABLE_SCREENSAVER
       
   197         allow_screensaver = 0;
       
   198 #else
       
   199         allow_screensaver = 1;
       
   200 #endif
       
   201     }
   193 
   202 
   194     /* Gather some information that is useful to know about the display */
   203     /* Gather some information that is useful to know about the display */
   195     CFNumberGetValue (CFDictionaryGetValue (save_mode, kCGDisplayBitsPerPixel),
   204     CFNumberGetValue (CFDictionaryGetValue (save_mode, kCGDisplayBitsPerPixel),
   196                       kCFNumberSInt32Type, &device_bpp);
   205                       kCFNumberSInt32Type, &device_bpp);
   197 
   206