mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Only reset battery level if battery type really changed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5734 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f2a5439cea
commit
0457a578b5
1 changed files with 4 additions and 2 deletions
|
|
@ -121,8 +121,10 @@ static int battery_type = 0;
|
|||
|
||||
void set_battery_type(int type)
|
||||
{
|
||||
battery_type = type;
|
||||
battery_level_cached = -1; /* reset on type change */
|
||||
if (type != battery_type) {
|
||||
battery_type = type;
|
||||
battery_level_cached = -1; /* reset on type change */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue