summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/plasma.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c
index 294747ffe4..450b09fb8c 100644
--- a/apps/plugins/plasma.c
+++ b/apps/plugins/plasma.c
@@ -236,6 +236,9 @@ void shades_generate(int time)
236 236
237 r++; g++; b++; 237 r++; g++; b++;
238 } 238 }
239#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
240 rb->lcd_pal256_update_pal(colours);
241#endif
239} 242}
240#else 243#else
241/* Make a smooth shade from black into white and back into black again. */ 244/* Make a smooth shade from black into white and back into black again. */
@@ -275,7 +278,11 @@ int main(void)
275 int button, x, y; 278 int button, x, y;
276 unsigned char p1,p2,p3,p4,t1,t2,t3,t4, z; 279 unsigned char p1,p2,p3,p4,t1,t2,t3,t4, z;
277#ifdef HAVE_LCD_COLOR 280#ifdef HAVE_LCD_COLOR
281#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
282 unsigned char *ptr;
283#else
278 fb_data *ptr; 284 fb_data *ptr;
285#endif
279 int time=0; 286 int time=0;
280#else 287#else
281 unsigned char *ptr; 288 unsigned char *ptr;
@@ -303,7 +310,12 @@ int main(void)
303 { 310 {
304#ifdef HAVE_LCD_COLOR 311#ifdef HAVE_LCD_COLOR
305 shades_generate(time++); /* dynamically */ 312 shades_generate(time++); /* dynamically */
313#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
314 ptr = (unsigned char*)rb->lcd_framebuffer;
315#else
306 ptr = rb->lcd_framebuffer; 316 ptr = rb->lcd_framebuffer;
317#endif
318
307#else 319#else
308 ptr = greybuffer; 320 ptr = greybuffer;
309#endif 321#endif
@@ -317,7 +329,11 @@ int main(void)
317 { 329 {
318 z = wave_array[t1] + wave_array[t2] + wave_array[t3] 330 z = wave_array[t1] + wave_array[t2] + wave_array[t3]
319 + wave_array[t4]; 331 + wave_array[t4];
332#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
333 *ptr++ = z;
334#else
320 *ptr++ = colours[z]; 335 *ptr++ = colours[z];
336#endif
321 t3+=1; 337 t3+=1;
322 t4+=2; 338 t4+=2;
323 } 339 }
@@ -330,7 +346,12 @@ int main(void)
330 p3+=sp3; 346 p3+=sp3;
331 p4-=sp4; 347 p4-=sp4;
332#ifdef HAVE_LCD_COLOR 348#ifdef HAVE_LCD_COLOR
349#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
350 rb->lcd_blit_pal256( (unsigned char*)rb->lcd_framebuffer,
351 0,0,0,0,LCD_WIDTH,LCD_HEIGHT);
352#else
333 rb->lcd_update(); 353 rb->lcd_update();
354#endif
334#else 355#else
335 grey_ub_gray_bitmap(greybuffer, 0, 0, LCD_WIDTH, LCD_HEIGHT); 356 grey_ub_gray_bitmap(greybuffer, 0, 0, LCD_WIDTH, LCD_HEIGHT);
336#endif 357#endif
@@ -392,8 +413,16 @@ enum plugin_status plugin_start(const void* parameter)
392 /* Turn off backlight timeout */ 413 /* Turn off backlight timeout */
393 backlight_force_on(); /* backlight control in lib/helper.c */ 414 backlight_force_on(); /* backlight control in lib/helper.c */
394 415
416#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
417 rb->lcd_set_mode(LCD_MODE_PAL256);
418#endif
419
395 ret = main(); 420 ret = main();
396 421
422#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
423 rb->lcd_set_mode(LCD_MODE_RGB565);
424#endif
425
397 return ret; 426 return ret;
398} 427}
399 428