X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Finput%2Fgesturedetector.cpp;h=1b577893c30e313ca4ca3997a73c06b1502fd26e;hb=6222d13e2790bdaa1013444f1221841397834cdd;hp=62ac3f050d09c9c849b7e0c6c62ecf8e3185a3bf;hpb=301e09d687a1217130fbb2240b7a80f1a00aacdc;p=libs%2Fgui.git diff --git a/source/input/gesturedetector.cpp b/source/input/gesturedetector.cpp index 62ac3f0..1b57789 100644 --- a/source/input/gesturedetector.cpp +++ b/source/input/gesturedetector.cpp @@ -1,7 +1,7 @@ +#include "gesturedetector.h" #define _USE_MATH_DEFINES #include #include -#include "gesturedetector.h" #include "touchscreen.h" using namespace std; @@ -10,10 +10,8 @@ namespace Msp { namespace Input { GestureDetector::GestureDetector(Touchscreen &ts): - touchscreen(ts), - current_gesture(GESTURE_NONE), - pending_tap(GESTURE_NONE), - invalid_gesture(false) + Device(UNSPECIFIED), + touchscreen(ts) { name = "Gesture"; @@ -150,11 +148,12 @@ void GestureDetector::start_gesture() if(!p.down) return; - /* At least one point needs to have moved more than the threshold to start - the gesture. */ - bool threshold_exceeded = false; - for(unsigned i=0; (i