diff options
| author | Juanma Barranquero | 2002-03-08 08:35:08 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2002-03-08 08:35:08 +0000 |
| commit | 007776bcc68f6549071f8c738ce6263293f09ae8 (patch) | |
| tree | 60102cc3b8ff802ad45ec666503927ee812e57ad /src | |
| parent | ded0c207ce9ecd3d8606a6490c909f47495ee64f (diff) | |
| download | emacs-007776bcc68f6549071f8c738ce6263293f09ae8.tar.gz emacs-007776bcc68f6549071f8c738ce6263293f09ae8.zip | |
(Fx_display_color_cells): Force 24+ bit color depths to 24-bit.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/w32fns.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8db2e02ef73..f3951915e48 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2002-03-08 Juanma Barranquero <lektu@terra.es> | ||
| 2 | |||
| 3 | * w32fns.c (Fx_display_color_cells): Force 24+ bit color depths to | ||
| 4 | 24-bit. | ||
| 5 | |||
| 1 | 2002-03-06 Jason Rumney <jasonr@gnu.org> | 6 | 2002-03-06 Jason Rumney <jasonr@gnu.org> |
| 2 | 7 | ||
| 3 | * w32term.c (x_draw_hollow_cursor): Draw same size as block cursor. | 8 | * w32term.c (x_draw_hollow_cursor): Draw same size as block cursor. |
diff --git a/src/w32fns.c b/src/w32fns.c index eba864be96e..5cfd25c8022 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -7768,8 +7768,10 @@ If omitted or nil, that stands for the selected frame's display. */) | |||
| 7768 | else | 7768 | else |
| 7769 | cap = GetDeviceCaps (hdc,NUMCOLORS); | 7769 | cap = GetDeviceCaps (hdc,NUMCOLORS); |
| 7770 | 7770 | ||
| 7771 | /* We force 24+ bit depths to 24-bit, both to prevent an overflow | ||
| 7772 | and because probably is more meaningful on Windows anyway */ | ||
| 7771 | if (cap < 0) | 7773 | if (cap < 0) |
| 7772 | cap = 1 << (dpyinfo->n_planes * dpyinfo->n_cbits); | 7774 | cap = 1 << min(dpyinfo->n_planes * dpyinfo->n_cbits, 24); |
| 7773 | 7775 | ||
| 7774 | ReleaseDC (dpyinfo->root_window, hdc); | 7776 | ReleaseDC (dpyinfo->root_window, hdc); |
| 7775 | 7777 | ||