The buttons_have_direction check currently only checks if /any/ tablet
button has its direction set. We strengthen this check so that it returns
true only if /all/ buttons have a direction set.

Signed-off-by: Jason Gerecke <jason.gere...@wacom.com>
---
 test/tablet-validity.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/tablet-validity.c b/test/tablet-validity.c
index f942cc5..ee07dae 100644
--- a/test/tablet-validity.c
+++ b/test/tablet-validity.c
@@ -54,11 +54,11 @@ static int buttons_have_direction (WacomDevice *device)
        for (button = 'A'; button < 'A' + num_buttons; button++) {
                WacomButtonFlags  flags;
                flags = libwacom_get_button_flag(device, button);
-               if (flags & WACOM_BUTTON_DIRECTION)
-                       return 1;
+               if (!(flags & WACOM_BUTTON_DIRECTION))
+                       return 0;
        }
 
-       return 0;
+       return 1;
 }
 
 static int match_mode_switch (WacomDevice *device, NumModesFn get_num_modes, 
WacomButtonFlags flag)
-- 
2.8.3


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to