summaryrefslogtreecommitdiff
path: root/src/grail-gestures.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-08-19 21:38:54 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-08-19 21:38:54 +0200
commit61d778784817e349e5ef7e419adfc0b521b7e33a (patch)
tree1d0bf4fc3be390682ce891ae042da0767ac039d8 /src/grail-gestures.c
parentbaf35a3b761172aeeefd7e761b7e29995a37a9e8 (diff)
Use the touch_caps directly rather than grail_get_units()
Diffstat (limited to 'src/grail-gestures.c')
-rw-r--r--src/grail-gestures.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/grail-gestures.c b/src/grail-gestures.c
index 95c1b57..1e89074 100644
--- a/src/grail-gestures.c
+++ b/src/grail-gestures.c
@@ -21,6 +21,7 @@
21 ****************************************************************************/ 21 ****************************************************************************/
22 22
23#include "grail-recognizer.h" 23#include "grail-recognizer.h"
24#include "grail-impl.h"
24#include <math.h> 25#include <math.h>
25 26
26static const float FM_SN[DIM_FM] = { 1000, 1000, 200, 1000 }; 27static const float FM_SN[DIM_FM] = { 1000, 1000, 200, 1000 };
@@ -141,14 +142,13 @@ static void move_update(struct move_model *m, int i, float x, grail_time_t t)
141 142
142void gru_init_motion(struct grail *ge) 143void gru_init_motion(struct grail *ge)
143{ 144{
145 struct touch_caps *caps = &ge->impl->dev.caps;
144 struct gesture_recognizer *gru = ge->gru; 146 struct gesture_recognizer *gru = ge->gru;
145 struct move_model *m = &gru->move; 147 struct move_model *m = &gru->move;
146 struct grail_coord min, max;
147 float D[DIM_FM]; 148 float D[DIM_FM];
148 int i; 149 int i;
149 grail_get_units(ge, &min, &max); 150 D[FM_X] = caps->max_x - caps->min_x;
150 D[FM_X] = max.x - min.x; 151 D[FM_Y] = caps->max_y - caps->min_y;
151 D[FM_Y] = max.y - min.y;
152 D[FM_R] = sqrt(D[FM_X] * D[FM_X] + D[FM_Y] * D[FM_Y]); 152 D[FM_R] = sqrt(D[FM_X] * D[FM_X] + D[FM_Y] * D[FM_Y]);
153 D[FM_A] = 2 * M_PI; 153 D[FM_A] = 2 * M_PI;
154 for (i = 0; i < DIM_FM; i++) { 154 for (i = 0; i < DIM_FM; i++) {