summaryrefslogtreecommitdiff
path: root/extras/input_id
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2011-06-06 18:44:09 +0200
committerKay Sievers <kay.sievers@vrfy.org>2011-06-06 18:44:09 +0200
commit24569e24dc94a7cffb8031eb0055e8d06cbdcb72 (patch)
treed62ccf082e585b80cdd2bd6f8c3e45617c96541d /extras/input_id
parent6cadb40abf964141fe8c956dd6808f4885321eb6 (diff)
accelerometer: add orientation property
Diffstat (limited to 'extras/input_id')
-rw-r--r--extras/input_id/input_id.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/extras/input_id/input_id.c b/extras/input_id/input_id.c
index 5965d848da..ba53df01b0 100644
--- a/extras/input_id/input_id.c
+++ b/extras/input_id/input_id.c
@@ -109,8 +109,14 @@ static void test_pointers (const unsigned long* bitmask_ev,
int is_mouse = 0;
int is_touchpad = 0;
- if (!test_bit (EV_KEY, bitmask_ev))
+ if (!test_bit (EV_KEY, bitmask_ev)) {
+ if (test_bit (EV_ABS, bitmask_ev) &&
+ test_bit (ABS_X, bitmask_abs) &&
+ test_bit (ABS_Y, bitmask_abs) &&
+ test_bit (ABS_Z, bitmask_abs))
+ puts("ID_INPUT_ACCELEROMETER=1");
return;
+ }
if (test_bit (EV_ABS, bitmask_ev) &&
test_bit (ABS_X, bitmask_abs) && test_bit (ABS_Y, bitmask_abs)) {