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:
Jens Arnold 2005-02-01 18:00:15 +00:00
parent f2a5439cea
commit 0457a578b5

View file

@ -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