diff options
author | Michael Giacomelli <giac2000@hotmail.com> | 2010-02-27 22:47:49 +0000 |
---|---|---|
committer | Michael Giacomelli <giac2000@hotmail.com> | 2010-02-27 22:47:49 +0000 |
commit | 1fefb48e871cee8328d8f9a5d375cde0627e603a (patch) | |
tree | 8abd3c9472abbbda0b97f1f75562471b62d83e76 /apps/misc.c | |
parent | ea4eadc582e8b5bfb64949e8d525ab5770cd00be (diff) | |
download | rockbox-1fefb48e871cee8328d8f9a5d375cde0627e603a.tar.gz rockbox-1fefb48e871cee8328d8f9a5d375cde0627e603a.zip |
Fix System/Running Time to reset the running time whenever a charger or USB cable is inserted, not just when the cable is inserted in the running time screen. Should now make the running time actually be the amount of time rockbox has run since the battery was last charged, which is as far as I can tell the original idea behind the runtime menu.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24954 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/misc.c')
-rw-r--r-- | apps/misc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/misc.c b/apps/misc.c index 8c60e32559..554d29e630 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -590,6 +590,7 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame | |||
590 | system_restore(); | 590 | system_restore(); |
591 | } | 591 | } |
592 | return SYS_USB_CONNECTED; | 592 | return SYS_USB_CONNECTED; |
593 | |||
593 | case SYS_POWEROFF: | 594 | case SYS_POWEROFF: |
594 | if (!clean_shutdown(callback, parameter)) | 595 | if (!clean_shutdown(callback, parameter)) |
595 | return SYS_POWEROFF; | 596 | return SYS_POWEROFF; |
@@ -601,6 +602,8 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame | |||
601 | 602 | ||
602 | case SYS_CHARGER_DISCONNECTED: | 603 | case SYS_CHARGER_DISCONNECTED: |
603 | car_adapter_mode_processing(false); | 604 | car_adapter_mode_processing(false); |
605 | /*reset rockbox battery runtime*/ | ||
606 | global_status.runtime = 0; | ||
604 | return SYS_CHARGER_DISCONNECTED; | 607 | return SYS_CHARGER_DISCONNECTED; |
605 | 608 | ||
606 | case SYS_CAR_ADAPTER_RESUME: | 609 | case SYS_CAR_ADAPTER_RESUME: |