summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-12-19 12:26:03 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-12-19 12:26:03 +0000
commitd152b6492a2371c261c195494864c3744609cf3c (patch)
treef0f6212b42ff5608eaa6b156342bf1939a9edd21 /apps/debug_menu.c
parent6efad93713a67ab21caf8be8c167c730912e8b86 (diff)
downloadrockbox-d152b6492a2371c261c195494864c3744609cf3c.zip
rockbox-d152b6492a2371c261c195494864c3744609cf3c.tar.gz
rockbox-d152b6492a2371c261c195494864c3744609cf3c.tar.bz2
rockbox-d152b6492a2371c261c195494864c3744609cf3c.tar.xz
update the runtime screen and move it to the inf menu instead of debug
menu git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11817 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 7d1e1c1..e21d203 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1484,91 +1484,6 @@ static bool view_battery(void)
#endif /* HAVE_LCD_BITMAP */
#endif
-static bool view_runtime(void)
-{
- char s[32];
- bool done = false;
- int state = 1;
-
- while(!done)
- {
- int y=0;
- int t;
- int key;
- lcd_clear_display();
-#ifdef HAVE_LCD_BITMAP
- lcd_puts(0, y++, "Running time:");
- y++;
-#endif
-
- if (state & 1) {
-#ifdef CONFIG_CHARGING
- if (charger_inserted()
-#ifdef HAVE_USB_POWER
- || usb_powered()
-#endif
- )
- {
- global_settings.runtime = 0;
- }
- else
-#endif
- {
- global_settings.runtime += ((current_tick - lasttime) / HZ);
- }
- lasttime = current_tick;
-
- t = global_settings.runtime;
- lcd_puts(0, y++, "Current time");
- }
- else {
- t = global_settings.topruntime;
- lcd_puts(0, y++, "Top time");
- }
-
- snprintf(s, sizeof(s), "%dh %dm %ds",
- t / 3600, (t % 3600) / 60, t % 60);
- lcd_puts(0, y++, s);
- lcd_update();
-
- /* Wait for a key to be pushed */
- key = get_action(CONTEXT_SETTINGS,HZ);
- switch(key) {
- case ACTION_STD_CANCEL:
- done = true;
- break;
-
- case ACTION_SETTINGS_INC:
- case ACTION_SETTINGS_DEC:
- if (state == 1)
- state = 2;
- else
- state = 1;
- break;
-
- case ACTION_STD_OK:
- lcd_clear_display();
- /*NOTE: this needs to be changed to sync splash! */
- lcd_puts(0,0,"Clear time?");
- lcd_puts(0,1,"PLAY = Yes");
- lcd_update();
- while (1) {
- key = get_action(CONTEXT_STD,TIMEOUT_BLOCK);
- if ( key == ACTION_STD_OK ) {
- if ( state == 1 )
- global_settings.runtime = 0;
- else
- global_settings.topruntime = 0;
- break;
- }
- }
- break;
- }
- }
- action_signalscreenchange();
- return false;
-}
-
#ifndef SIMULATOR
#ifdef HAVE_MMC
static bool dbg_mmc_info(void)
@@ -2192,7 +2107,6 @@ bool debug_menu(void)
{ "pm histogram", peak_meter_histogram},
#endif /* PM_DEBUG */
#endif /* HAVE_LCD_BITMAP */
- { "View runtime", view_runtime },
#ifndef SIMULATOR
#ifdef CONFIG_TUNER
{ "FM Radio", dbg_fm_radio },