/[emacs]/emacs/src/macterm.c
ViewVC logotype

Diff of /emacs/src/macterm.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3.2.16 by miles, Tue Jul 6 10:23:40 2004 UTC revision 1.3.2.17 by miles, Tue Jul 6 10:27:00 2004 UTC
# Line 8854  mac_initialize_display_info () Line 8854  mac_initialize_display_info ()
8854    dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType);    dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType);
8855  #ifdef MAC_OSX  #ifdef MAC_OSX
8856    /* HasDepth returns true if it is possible to have a 32 bit display,    /* HasDepth returns true if it is possible to have a 32 bit display,
8857       but this may not be what is actually used.  Mac OSX can do better.  */       but this may not be what is actually used.  Mac OSX can do better.
8858    dpyinfo->n_planes = CGDisplayBitsPerPixel (CGMainDisplayID ());       CGMainDisplayID is only available on OSX 10.2 and higher, but the
8859         header for CGGetActiveDisplayList says that the first display returned
8860         is the active one, so we use that.  */
8861      {
8862        CGDirectDisplayID disp_id[1];
8863        CGDisplayCount disp_count;
8864        CGDisplayErr error_code;
8865    
8866        error_code = CGGetActiveDisplayList (1, disp_id, &disp_count);
8867        if (error_code != 0)
8868          error ("No display found, CGGetActiveDisplayList error %d", error_code);
8869    
8870        dpyinfo->n_planes = CGDisplayBitsPerPixel (disp_id[0]);
8871      }
8872  #else  #else
8873    for (dpyinfo->n_planes = 32; dpyinfo->n_planes > 0; dpyinfo->n_planes >>= 1)    for (dpyinfo->n_planes = 32; dpyinfo->n_planes > 0; dpyinfo->n_planes >>= 1)
8874      if (HasDepth (main_device_handle, dpyinfo->n_planes,      if (HasDepth (main_device_handle, dpyinfo->n_planes,

Legend:
Removed from v.1.3.2.16  
changed lines
  Added in v.1.3.2.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26