Credits: better counter when scrolling manually

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14629 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Peter D'Hoye 2007-09-06 22:32:46 +00:00
parent ad479ba40b
commit cc4541f086

View file

@ -142,7 +142,7 @@ void roll_credits(void)
int name_w, name_h, name_targetpos=1, font_h; int name_w, name_h, name_targetpos=1, font_h;
int credits_w, credits_pos; int credits_w, credits_pos;
int numnames = (sizeof(credits)/sizeof(char*)); int numnames = (sizeof(credits)/sizeof(char*));
char name[40], elapsednames[20]; char name[40], elapsednames[32];
int action = ACTION_NONE; int action = ACTION_NONE;
/* control if scrolling is automatic (with animation) or manual */ /* control if scrolling is automatic (with animation) or manual */
@ -310,7 +310,8 @@ void roll_credits(void)
{ {
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->snprintf(elapsednames, sizeof(elapsednames), rb->snprintf(elapsednames, sizeof(elapsednames),
"[Credits] %d/%d", j+NUM_VISIBLE_LINES, numnames); "[Credits] %d-%d/%d", j+1,
j+NUM_VISIBLE_LINES, numnames);
rb->lcd_getstringsize(elapsednames, &credits_w, NULL); rb->lcd_getstringsize(elapsednames, &credits_w, NULL);
rb->lcd_putsxy(CREDITS_TARGETPOS, 0, elapsednames); rb->lcd_putsxy(CREDITS_TARGETPOS, 0, elapsednames);