mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 21:55:10 -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)
|
void set_battery_type(int type)
|
||||||
{
|
{
|
||||||
battery_type = type;
|
if (type != battery_type) {
|
||||||
battery_level_cached = -1; /* reset on type change */
|
battery_type = type;
|
||||||
|
battery_level_cached = -1; /* reset on type change */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue