From 8964fd1495ba2c69cff40e378d08aec4a651877f Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Wed, 2 Sep 2009 02:41:32 +0000 Subject: Fire: Add support for 256 color hardware pallete mode git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22601 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/fire.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/apps/plugins/fire.c b/apps/plugins/fire.c index d8b31075ad..201d18970f 100644 --- a/apps/plugins/fire.c +++ b/apps/plugins/fire.c @@ -111,6 +111,9 @@ void color_palette_init(fb_data* palette) palette[i + 192]=LCD_RGBPACK(255, 255, 192 + i); palette[i + 224]=LCD_RGBPACK(255, 255, 224 + i); } +#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256) + rb->lcd_pal256_update_pal(palette); +#endif } #endif @@ -227,8 +230,12 @@ static void fire_init(struct fire* fire) static inline void fire_draw(struct fire* fire) { +#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256) + rb->lcd_blit_pal256((unsigned char*)&fire->fire[0][0],0,0,0,0,LCD_WIDTH,LCD_HEIGHT); +#else int y; unsigned char *src = &fire->fire[0][0]; + #ifndef HAVE_LCD_COLOR unsigned char *dest, *end; #else @@ -253,6 +260,8 @@ static inline void fire_draw(struct fire* fire) #ifdef HAVE_LCD_COLOR rb->lcd_update(); #endif + +#endif } void cleanup(void *parameter) @@ -355,7 +364,15 @@ enum plugin_status plugin_start(const void* parameter) /* Turn off backlight timeout */ backlight_force_on(); /* backlight control in lib/helper.c */ +#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256) + rb->lcd_set_mode(LCD_MODE_PAL256); +#endif + ret = main(); + +#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256) + rb->lcd_set_mode(LCD_MODE_RGB565); +#endif return ret; } -- cgit v1.2.3