1
0
Fork 0
forked from len0rd/rockbox

Fix FS #8981 (bounce color): save current forecolor before changing it so we can set it back

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17529 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Peter D'Hoye 2008-05-15 22:05:24 +00:00
parent cd8151f648
commit 83e6be5649

View file

@ -441,6 +441,9 @@ static int scrollit(void)
char* rock="Rockbox! Pure pleasure. Pure fun. Oooh. What fun! ;-) "; char* rock="Rockbox! Pure pleasure. Pure fun. Oooh. What fun! ;-) ";
unsigned int rocklen = rb->strlen(rock); unsigned int rocklen = rb->strlen(rock);
int letter; int letter;
#if LCD_DEPTH > 1
unsigned prev_color;
#endif
rb->lcd_clear_display(); rb->lcd_clear_display();
while(1) while(1)
@ -464,6 +467,10 @@ static int scrollit(void)
addclock(); addclock();
#endif #endif
#if LCD_DEPTH > 1
prev_color = rb->lcd_get_foreground();
#endif
for(i=0, yy=y, xx=x; xx < LCD_WIDTH; i++) { for(i=0, yy=y, xx=x; xx < LCD_WIDTH; i++) {
letter = rock[(i+textpos) % rocklen ]; letter = rock[(i+textpos) % rocklen ];
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
@ -476,7 +483,7 @@ static int scrollit(void)
xx += LETTER_WIDTH; xx += LETTER_WIDTH;
} }
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
rb->lcd_set_foreground(LCD_BLACK); rb->lcd_set_foreground(prev_color);
#endif #endif
rb->lcd_update(); rb->lcd_update();
@ -573,7 +580,8 @@ static int loopit(void)
} }
enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) enum plugin_status plugin_start(const struct plugin_api* api,
const void* parameter)
{ {
int w, h; int w, h;
char *off = "[Off] to stop"; char *off = "[Off] to stop";