backlight - on get fails, also retry a few times

so sometimes i see gets fail, especially on wakeup, so retry.
This commit is contained in:
Carsten Haitzler 2020-02-10 08:09:47 +00:00
parent 346969eb90
commit eba37f40a6
1 changed files with 2 additions and 2 deletions

View File

@ -90,8 +90,8 @@ _backlight_system_ddc_get_cb(void *data, const char *params)
if (!bd->edid) return;
if (!!strncmp(bd->edid, edid, strlen(edid))) return;
e_system_handler_del("ddc-val-get", _backlight_system_ddc_get_cb, bd);
if (val < 0) return; // get failed.... don't update
fval = (double)val / 100.0;
if (val < 0) fval = -1.0;
else fval = (double)val / 100.0;
if ((fabs(fval - bd->val) >= DBL_EPSILON) || (val == -1))
{
bd->val = fval;