1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Antoine Cellerier 2007-10-15 21:00:57 +00:00
parent c2e5065ede
commit c05ba51007

View file

@ -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;
}