summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-10-17 13:54:48 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-10-17 13:54:48 +0000
commitfb067481a8d2ec5c890fab5860ab246d019eecc9 (patch)
tree9f5c0d8d3f808cc662abc1be3386e9c783027366 /apps/debug_menu.c
parent2ec8e7d72b6e18cc79cea080b564df5fd1d50f3f (diff)
downloadrockbox-fb067481a8d2ec5c890fab5860ab246d019eecc9.tar.gz
rockbox-fb067481a8d2ec5c890fab5860ab246d019eecc9.zip
Runtime display bug fix by Craig Sather (patch #766552)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3974 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index f27bbac099..a2cda985d4 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1148,6 +1148,16 @@ static bool view_runtime(void)
1148#endif 1148#endif
1149 1149
1150 if (state & 1) { 1150 if (state & 1) {
1151 if (charger_inserted())
1152 {
1153 global_settings.runtime = 0;
1154 }
1155 else
1156 {
1157 global_settings.runtime += ((current_tick - lasttime) / HZ);
1158 }
1159 lasttime = current_tick;
1160
1151 t = global_settings.runtime; 1161 t = global_settings.runtime;
1152 lcd_puts(0, y++, "Current time"); 1162 lcd_puts(0, y++, "Current time");
1153 } 1163 }
@@ -1162,7 +1172,7 @@ static bool view_runtime(void)
1162 lcd_update(); 1172 lcd_update();
1163 1173
1164 /* Wait for a key to be pushed */ 1174 /* Wait for a key to be pushed */
1165 key = button_get_w_tmo(HZ*5); 1175 key = button_get_w_tmo(HZ);
1166 switch(key) { 1176 switch(key) {
1167#ifdef HAVE_PLAYER_KEYPAD 1177#ifdef HAVE_PLAYER_KEYPAD
1168 case BUTTON_STOP | BUTTON_REL: 1178 case BUTTON_STOP | BUTTON_REL: