aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-12-23 15:01:29 -0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-12-23 15:45:34 -0200
commit7e8fd546be7eba6509645b526e93bec9aa8b47a7 (patch)
treee283a38e851a35672260ad276bff590955684ddc /src
parentfd0012dc863fa13b7c4e23cbf90f92051aca8cf7 (diff)
v4l2: fix control availability check
All controls are warranted to be between 0 and 65535 by the logic used inside libv4l2. It means that a zero value is valid. This fixes a bug where the color control is not shown if the value of the control is zero when camorama is started. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'src')
-rw-r--r--src/camorama-window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/camorama-window.c b/src/camorama-window.c
index 8bebbde..21fefc7 100644
--- a/src/camorama-window.c
+++ b/src/camorama-window.c
@@ -300,7 +300,7 @@ void load_interface(cam_t *cam)
gtk_range_set_value((GtkRange *)GTK_WIDGET(gtk_builder_get_object(cam->xml, "brightness_slider")),
(int)(cam->brightness / 256));
}
- if (cam->colour < 1) {
+ if (cam->colour < 0) {
gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(cam->xml,
"color_icon")));
gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(cam->xml,

Privacy Policy