From 8992ff2c2c6e60d88f0e22a048f343947c458cc3 Mon Sep 17 00:00:00 2001 From: kraxel Date: Tue, 13 Jun 2006 13:35:48 +0000 Subject: merge a bunch of fixed from Alan Curry --- fb-gui.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fb-gui.c') diff --git a/fb-gui.c b/fb-gui.c index be2eeb8..67a3412 100644 --- a/fb-gui.c +++ b/fb-gui.c @@ -47,14 +47,19 @@ linear_palette(int r, int g, int b) size = 256 >> (8 - r); for (i = 0; i < size; i++) p_red[i] = calc_gamma(i,size); + p_cmap.len = size; size = 256 >> (8 - g); for (i = 0; i < size; i++) p_green[i] = calc_gamma(i,size); + if (p_cmap.len < size) + p_cmap.len = size; size = 256 >> (8 - b); for (i = 0; i < size; i++) p_blue[i] = calc_gamma(i,size); + if (p_cmap.len < size) + p_cmap.len = size; } static void @@ -70,6 +75,7 @@ dither_palette(int r, int g, int b) p_green[i] = calc_gamma(gs * ((i / b) % g), 255); p_blue[i] = calc_gamma(bs * ((i) % b), 255); } + p_cmap.len = 256; } static void shadow_lut_init_one(int32_t *lut, int bits, int shift) -- cgit