Index: wps-display.c =================================================================== RCS file: /cvsroot/rockbox/apps/wps-display.c,v retrieving revision 1.137 diff -u -r1.137 wps-display.c --- wps-display.c 10 Sep 2005 12:28:16 -0000 1.137 +++ wps-display.c 12 Sep 2005 01:15:28 -0000 @@ -496,6 +496,8 @@ int *intval) { struct mp3entry *id3 = cid3; /* default to current song */ + static int batt_anim = 0; + static int batt_change_freq = 0; if ((0 == tag[0]) || (0 == tag[1])) { @@ -773,7 +775,28 @@ if (l > -1) { snprintf(buf, buf_size, "%d%%", l); - *intval = l / 20 + 1; + + /* simulate animated battery when charging */ + if (charger_inserted()) + { + /* slow down the animation. only change + every three passes. */ + if ( batt_change_freq >= 2 ) + { + batt_change_freq = 0; + batt_anim = (batt_anim > 5) ? 1 : batt_anim+1; + *intval = batt_anim; + } + else + { + batt_change_freq++; + *intval = batt_anim; + } + } + else + { + *intval = l / 20 + 1; + } } else {