Mercurial > emacs
diff src/w32fns.c @ 43773:8d3931ead0df
(Fx_display_color_cells): Force 24+ bit color depths to 24-bit.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 08 Mar 2002 08:33:30 +0000 |
parents | a3cecd273126 |
children | f5a7ee0b1b0e |
line wrap: on
line diff
--- a/src/w32fns.c Fri Mar 08 08:21:16 2002 +0000 +++ b/src/w32fns.c Fri Mar 08 08:33:30 2002 +0000 @@ -7768,8 +7768,10 @@ else cap = GetDeviceCaps (hdc,NUMCOLORS); + /* We force 24+ bit depths to 24-bit, both to prevent an overflow + and because probably is more meaningful on Windows anyway */ if (cap < 0) - cap = 1 << (dpyinfo->n_planes * dpyinfo->n_cbits); + cap = 1 << min(dpyinfo->n_planes * dpyinfo->n_cbits, 24); ReleaseDC (dpyinfo->root_window, hdc);