diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2003-06-30 02:07:20 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2003-06-30 02:07:20 +0000 |
| commit | 10ac8a839fb273992c6459f1c1d893016b710fc6 (patch) | |
| tree | 0bc590d9ecbf23b151c217df2729322941fa37c8 /apps/plugins | |
| parent | 9c6abb19ae012763e4ee864d834b2492cdca8732 (diff) | |
| download | rockbox-10ac8a839fb273992c6459f1c1d893016b710fc6.zip rockbox-10ac8a839fb273992c6459f1c1d893016b710fc6.tar.gz rockbox-10ac8a839fb273992c6459f1c1d893016b710fc6.tar.bz2 rockbox-10ac8a839fb273992c6459f1c1d893016b710fc6.tar.xz | |
The conversion to plugin broke the Bounce demo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3787 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/bounce.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c index 0c53d49..c731764 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; - i<sizeof(rock)-1; + i<rocklen; i++, yy+=values[NUM_YDIST].num, xx+=values[NUM_XDIST].num) rb->lcd_bitmap((char *)char_gen_12x16[rock[i]-0x20], xtable[xx%71], table[yy&63], |