From 10ac8a839fb273992c6459f1c1d893016b710fc6 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Mon, 30 Jun 2003 02:07:20 +0000 Subject: The conversion to plugin broke the Bounce demo git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3787 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/bounce.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c index 0c53d49887..c731764a63 100644 --- a/apps/plugins/bounce.c +++ b/apps/plugins/bounce.c @@ -231,6 +231,7 @@ static int scrollit(void) int textpos=0; char* rock="Rockbox! Pure pleasure. Pure fun. Oooh. What fun! ;-) "; + unsigned int rocklen = rb->strlen(rock); int letter; rb->lcd_clear_display(); @@ -245,7 +246,7 @@ static int scrollit(void) rb->lcd_clear_display(); for(i=0, yy=y, xx=x; i< LETTERS_ON_SCREEN; i++) { - letter = rock[(i+textpos) % (sizeof(rock)-1) ]; + letter = rock[(i+textpos) % rocklen ]; rb->lcd_bitmap((char *)char_gen_12x16[letter-0x20], xx, table[yy&63], @@ -282,6 +283,7 @@ static int loopit(void) unsigned int xsanke=0; char* rock="ROCKbox"; + unsigned int rocklen = rb->strlen(rock); int show=0; int timeout=0; @@ -334,7 +336,7 @@ static int loopit(void) timeout--; } for(i=0, yy=y, xx=x; - ilcd_bitmap((char *)char_gen_12x16[rock[i]-0x20], xtable[xx%71], table[yy&63], -- cgit v1.2.3