summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/fractals/mandelbrot_set.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/plugins/fractals/mandelbrot_set.c b/apps/plugins/fractals/mandelbrot_set.c
index fbd527438e..ad5a172f33 100644
--- a/apps/plugins/fractals/mandelbrot_set.c
+++ b/apps/plugins/fractals/mandelbrot_set.c
@@ -31,14 +31,16 @@ static unsigned char imgbuffer[LCD_HEIGHT];
31static fb_data imgbuffer[LCD_HEIGHT]; 31static fb_data imgbuffer[LCD_HEIGHT];
32#endif 32#endif
33 33
34#define NUM_COLORS ((unsigned)(1 << LCD_DEPTH)) 34#ifdef USEGSLIB
35 35#define LCOLOR(iter) (iter << 5)
36#else
36/* 37/*
37 * Spread iter's colors over color range. 38 * Spread iter's colors over color range.
38 * 345 (=15*26-45) is max_iter maximal value 39 * 345 (=15*26-45) is max_iter maximal value
39 * This implementation ignores pixel format, thus it is not uniformly spread 40 * This implementation ignores pixel format, thus it is not uniformly spread
40 */ 41 */
41#define LCOLOR(iter) ((iter * NUM_COLORS) / 345) 42#define LCOLOR(iter) ((iter << LCD_DEPTH) / 345)
43#endif
42 44
43#ifdef HAVE_LCD_COLOR 45#ifdef HAVE_LCD_COLOR
44#define COLOR(iter) (fb_data)LCOLOR(iter) 46#define COLOR(iter) (fb_data)LCOLOR(iter)