summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Cellerier <dionoea@videolan.org>2007-10-15 21:00:57 +0000
committerAntoine Cellerier <dionoea@videolan.org>2007-10-15 21:00:57 +0000
commitc05ba51007b79be4184313fded2bdd06665d3c69 (patch)
tree189cd0bbcbea7e4ae725a4e9daa92e02ea94b588
parentc2e5065ede4f17b160c28835128462ea2ddea7d9 (diff)
downloadrockbox-c05ba51007b79be4184313fded2bdd06665d3c69.tar.gz
rockbox-c05ba51007b79be4184313fded2bdd06665d3c69.tar.bz2
rockbox-c05ba51007b79be4184313fded2bdd06665d3c69.zip
Enable star transition on all targets and prevent lcd partial updating of 0 area rectangles. This should fix FS #6334. As I don't own one of the targets which were affected by this bug I can't confirm.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15127 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/star.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index 1c2501d6a4..069981868b 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -512,8 +512,6 @@ void star_display_text(char *str, bool waitkey)
/**
* Do a pretty transition from one level to another.
*/
-#if !defined(GIGABEAT_F) || defined(SIMULATOR)
-/* FIXME: this crashes on the Gigabeat but not in the sim */
static void star_transition_update(void)
{
const int center_x = LCD_WIDTH / 2;
@@ -537,10 +535,16 @@ static void star_transition_update(void)
var_y -= LCD_WIDTH;
y+=step;
}
- rb->lcd_update_rect(center_x - x, center_y - y, x*2, step);
- rb->lcd_update_rect(center_x - x, center_y - y, step, y*2);
- rb->lcd_update_rect(center_x + x - step, center_y - y, step, y*2);
- rb->lcd_update_rect(center_x - x, center_y + y - step, x*2, step);
+ if( x )
+ {
+ rb->lcd_update_rect(center_x - x, center_y - y, x*2, step);
+ rb->lcd_update_rect(center_x - x, center_y + y - step, x*2, step);
+ }
+ if( y )
+ {
+ rb->lcd_update_rect(center_x - x, center_y - y, step, y*2);
+ rb->lcd_update_rect(center_x + x - step, center_y - y, step, y*2);
+ }
STAR_SLEEP
}
#else
@@ -555,16 +559,21 @@ static void star_transition_update(void)
var_x -= LCD_HEIGHT;
x++;
}
- rb->lcd_update_rect(center_x - x, center_y - y, x * 2, 1);
- rb->lcd_update_rect(center_x - x, center_y - y, 1, y * 2);
- rb->lcd_update_rect(center_x + x - 1, center_y - y, 1, y * 2);
- rb->lcd_update_rect(center_x - x, center_y + y - 1, x * 2, 1);
+ if( x )
+ {
+ rb->lcd_update_rect(center_x - x, center_y - y, x * 2, 1);
+ rb->lcd_update_rect(center_x - x, center_y + y - 1, x * 2, 1);
+ }
+ if( y )
+ {
+ rb->lcd_update_rect(center_x - x, center_y - y, 1, y * 2);
+ rb->lcd_update_rect(center_x + x - 1, center_y - y, 1, y * 2);
+ }
STAR_SLEEP
}
#endif
rb->lcd_update();
}
-#endif
/**
* Display information board of the current level.
@@ -666,11 +675,7 @@ static int star_load_level(int current_level)
ptr_tab++;
}
star_display_board_info(current_level);
-#if !defined(GIGABEAT_F) || defined(SIMULATOR)
star_transition_update();
-#else
- rb->lcd_update();
-#endif
return 1;
}