summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-09-02 02:41:32 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-09-02 02:41:32 +0000
commit8964fd1495ba2c69cff40e378d08aec4a651877f (patch)
tree65b1309061234c78dd1902de75016cafc2127104 /apps/plugins
parent0f3452e0be2bd35b5e662e467868cb3118b08416 (diff)
downloadrockbox-8964fd1495ba2c69cff40e378d08aec4a651877f.zip
rockbox-8964fd1495ba2c69cff40e378d08aec4a651877f.tar.gz
rockbox-8964fd1495ba2c69cff40e378d08aec4a651877f.tar.bz2
rockbox-8964fd1495ba2c69cff40e378d08aec4a651877f.tar.xz
Fire: Add support for 256 color hardware pallete mode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22601 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/fire.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/plugins/fire.c b/apps/plugins/fire.c
index d8b3107..201d189 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;
}