mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Moved runtime-reset-when-charger-connected to status.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2925 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
34c03ef8bc
commit
34351e8251
2 changed files with 5 additions and 8 deletions
|
|
@ -349,14 +349,9 @@ int settings_save( void )
|
|||
{
|
||||
static long lasttime = 0;
|
||||
|
||||
/* reset counter if charger is inserted */
|
||||
if ( charger_inserted() ) {
|
||||
global_settings.runtime = 0;
|
||||
}
|
||||
else {
|
||||
global_settings.runtime += (current_tick - lasttime) / HZ;
|
||||
lasttime = current_tick;
|
||||
}
|
||||
global_settings.runtime += (current_tick - lasttime) / HZ;
|
||||
lasttime = current_tick;
|
||||
|
||||
if ( global_settings.runtime > global_settings.topruntime )
|
||||
global_settings.topruntime = global_settings.runtime;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue