From c05ba51007b79be4184313fded2bdd06665d3c69 Mon Sep 17 00:00:00 2001 From: Antoine Cellerier Date: Mon, 15 Oct 2007 21:00:57 +0000 Subject: 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 --- apps/plugins/star.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'apps') 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; } -- cgit v1.2.3