Module: wine Branch: master Commit: e5d4d91871cbf80ecece669e2ba7b9ded00176aa URL: http://source.winehq.org/git/wine.git/?a=commit;h=e5d4d91871cbf80ecece669e2b...
Author: Alex Henrie alexhenrie24@gmail.com Date: Thu Oct 29 21:30:22 2015 -0600
winex11: Make color cubes as big as possible.
Signed-off-by: Alex Henrie alexhenrie24@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winex11.drv/palette.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/palette.c b/dlls/winex11.drv/palette.c index 953c9ea..f950334 100644 --- a/dlls/winex11.drv/palette.c +++ b/dlls/winex11.drv/palette.c @@ -594,10 +594,10 @@ static void X11DRV_PALETTE_FillDefaultColors( const PALETTEENTRY *sys_pal_templa
if (palette_size <= NB_RESERVED_COLORS) return; - while (i*i*i < (palette_size - NB_RESERVED_COLORS)) i++; + while (i*i*i <= (palette_size - NB_RESERVED_COLORS)) i++; no_r = no_g = no_b = --i; - if ((no_r * (no_g+1) * no_b) < (palette_size - NB_RESERVED_COLORS)) no_g++; - if ((no_r * no_g * (no_b+1)) < (palette_size - NB_RESERVED_COLORS)) no_b++; + if ((no_r * (no_g+1) * no_b) <= (palette_size - NB_RESERVED_COLORS)) no_g++; + if ((no_r * no_g * (no_b+1)) <= (palette_size - NB_RESERVED_COLORS)) no_b++; inc_r = (255 - NB_COLORCUBE_START_INDEX)/no_r; inc_g = (255 - NB_COLORCUBE_START_INDEX)/no_g; inc_b = (255 - NB_COLORCUBE_START_INDEX)/no_b;