8840 |
dpyinfo->resx = 75.0; |
dpyinfo->resx = 75.0; |
8841 |
dpyinfo->resy = 75.0; |
dpyinfo->resy = 75.0; |
8842 |
dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType); |
dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType); |
8843 |
|
#ifdef MAC_OSX |
8844 |
|
/* HasDepth returns true if it is possible to have a 32 bit display, |
8845 |
|
but this may not be what is actually used. Mac OSX can do better. */ |
8846 |
|
dpyinfo->n_planes = CGDisplayBitsPerPixel (CGMainDisplayID ()); |
8847 |
|
#else |
8848 |
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) |
8849 |
if (HasDepth (main_device_handle, dpyinfo->n_planes, |
if (HasDepth (main_device_handle, dpyinfo->n_planes, |
8850 |
gdDevType, dpyinfo->color_p)) |
gdDevType, dpyinfo->color_p)) |
8851 |
break; |
break; |
8852 |
|
#endif |
8853 |
dpyinfo->height = (**main_device_handle).gdRect.bottom; |
dpyinfo->height = (**main_device_handle).gdRect.bottom; |
8854 |
dpyinfo->width = (**main_device_handle).gdRect.right; |
dpyinfo->width = (**main_device_handle).gdRect.right; |
8855 |
dpyinfo->grabbed = 0; |
dpyinfo->grabbed = 0; |