battery modules - actually set ac power flag based on ac presence

this should fix T3649

@fix
This commit is contained in:
Carsten Haitzler 2017-10-18 13:32:50 +09:00
parent f20765df67
commit 929037aaa0
2 changed files with 14 additions and 2 deletions

View File

@ -289,7 +289,13 @@ _battery_device_update(void)
int acnum = 0;
EINA_LIST_FOREACH(device_ac_adapters, l, ac)
if (ac->present) acnum++;
{
if (ac->present)
{
acnum++;
have_power = 1;
}
}
EINA_LIST_FOREACH(device_batteries, l, bat)
{

View File

@ -314,7 +314,13 @@ _batman_device_update(Instance *inst)
int acnum = 0;
EINA_LIST_FOREACH(batman_device_ac_adapters, l, ac)
if (ac->present) acnum++;
{
if (ac->present)
{
acnum++;
have_power = 1;
}
}
EINA_LIST_FOREACH(batman_device_batteries, l, bat)
{