Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bugfix Zero runtime not reset runtime while charger connected

I can't repro the users issue guessing its the difference with
charging monitor vs not

https://forums.rockbox.org/index.php/topic,55406.0.html

Change-Id: I252f48cd24a9cb0fb2b899352fe9f9ac540a9a5b

+11 -4
+2 -2
apps/gui/statusbar.c
··· 192 192 193 193 /* zero battery run time if charging */ 194 194 if (charge_state > DISCHARGING) 195 - reset_runtime(); 195 + zero_runtime(); 196 196 197 197 /* animate battery if charging */ 198 198 if ((charge_state == DISCHARGING) || (charge_state == TRICKLE)) ··· 202 202 else 203 203 { 204 204 #else /* CONFIG_CHARGING < CHARGING_MONITOR */ 205 - reset_runtime(); 205 + zero_runtime(); 206 206 { 207 207 #endif /* CONFIG_CHARGING < CHARGING_MONITOR */ 208 208 /* animate in (max.) 4 steps, starting near the current charge level */
+6 -1
apps/settings.c
··· 662 662 void reset_runtime(void) 663 663 { 664 664 update_runtime(); /* in case this is > topruntimetime */ 665 - lasttime = current_tick; 665 + zero_runtime(); 666 666 global_status.runtime = 0; 667 667 } 668 668 ··· 679 679 680 680 if ( global_status.runtime > global_status.topruntime ) 681 681 global_status.topruntime = global_status.runtime; 682 + } 683 + 684 + void zero_runtime(void) 685 + { 686 + lasttime = current_tick; 682 687 } 683 688 684 689 void status_save(bool force)
+3 -1
apps/settings.h
··· 262 262 263 263 264 264 /** function prototypes **/ 265 + void reset_runtime(void); 265 266 void update_runtime(void); 267 + void zero_runtime(void); 266 268 void settings_load(void) INIT_ATTR; 267 269 bool settings_load_config(const char* file, bool apply); 268 270 269 271 void status_save(bool force); 270 272 int settings_save(void); 271 - void reset_runtime(void); 273 + 272 274 /* defines for the options paramater */ 273 275 enum { 274 276 SETTINGS_SAVE_CHANGED = 0,