diff options
| author | Henrik Rydberg <rydberg@alnilam.(none)> | 2010-02-01 20:19:45 +0100 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@alnilam.(none)> | 2010-02-01 20:44:42 +0100 |
| commit | a7eb5d7a955a2b90ebfbeb5177c3d01e5c287e30 (patch) | |
| tree | bc9777c1767c95f3c89056847fd6d4b26a8e0152 /src/gestures.c | |
| parent | 8dcaab4219c3827c0661917542a28b1276703d8b (diff) | |
common: add some more bit utilities
Diffstat (limited to 'src/gestures.c')
| -rw-r--r-- | src/gestures.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gestures.c b/src/gestures.c index 8ba32f3..89dad1a 100644 --- a/src/gestures.c +++ b/src/gestures.c | |||
| @@ -51,11 +51,11 @@ void extract_gestures(struct Gestures *gs, struct MTouch* mt) | |||
| 51 | if (nsf == 3) | 51 | if (nsf == 3) |
| 52 | SETBIT(gs->type, GS_HSCROLL); | 52 | SETBIT(gs->type, GS_HSCROLL); |
| 53 | } | 53 | } |
| 54 | if (mt->ns.button == (1U << MT_BUTTON_LEFT)) { | 54 | if (mt->ns.button == BITMASK(MT_BUTTON_LEFT)) { |
| 55 | if (nsf == 2) | 55 | if (nsf == 2) |
| 56 | mt->ns.button = (1U << MT_BUTTON_RIGHT); | 56 | mt->ns.button = BITMASK(MT_BUTTON_RIGHT); |
| 57 | if (nsf == 3) | 57 | if (nsf == 3) |
| 58 | mt->ns.button = (1U << MT_BUTTON_MIDDLE); | 58 | mt->ns.button = BITMASK(MT_BUTTON_MIDDLE); |
| 59 | } | 59 | } |
| 60 | for (i = 0; i < DIM_BUTTON; i++) { | 60 | for (i = 0; i < DIM_BUTTON; i++) { |
| 61 | if (GETBIT(mt->ns.button, i) != GETBIT(mt->os.button, i)) { | 61 | if (GETBIT(mt->ns.button, i) != GETBIT(mt->os.button, i)) { |
