From d517d375356f25c2062fef812723911107d01eb0 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 11 Jan 2013 10:51:24 +0000 Subject: [PATCH] backlight no longer attempts to apply settings for dummy devices SVN revision: 82626 --- ChangeLog | 1 + NEWS | 1 + src/bin/e_backlight.c | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b0bd65040..c44eaaf75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * e_manager_comp_set() is no longer accessible by modules * added option to disable comp effects on screen + * fixed bug where backlight settings would try to update dummy backlight devices 2013-01-10 Carsten Haitzler diff --git a/NEWS b/NEWS index 9f8a96bc6..fa9a35801 100644 --- a/NEWS +++ b/NEWS @@ -95,3 +95,4 @@ Fixes: * fixed bug where internal dialogs would not redraw after unfullscreening * fixed bug where starting with a nonexistent config could cause a crash instead of simply restarting * fixed window border hide bug where after iconification hides leave ghosts + * fixed bug where backlight settings would try to update dummy backlight devices diff --git a/src/bin/e_backlight.c b/src/bin/e_backlight.c index 21b98e641..b9c1b232f 100644 --- a/src/bin/e_backlight.c +++ b/src/bin/e_backlight.c @@ -515,12 +515,19 @@ _bl_sys_level_get(void) maxval = atoi(str); eina_stringshare_del(str); - if (maxval <= 0) maxval = 255; + if (maxval < 0) maxval = 255; str = eeze_udev_syspath_get_sysattr(bl_sysval, "brightness"); if (!str) return; val = atoi(str); eina_stringshare_del(str); + if ((!maxval) && (!val)) + { + bl_val = 0; + sysmode = MODE_NONE; + return; + } + if (!maxval) maxval = 255; if ((val >= 0) && (val <= maxval)) bl_val = (double)val / (double)maxval; // fprintf(stderr, "GET: %i/%i (%1.3f)\n", val, maxval, bl_val);