X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fgesturedetector.cpp;h=08232cf8f0fecf023e98fe43b452d2bf9135ee0e;hb=5658e0f743064cc1c8ca77aed86891b8e803e0d7;hp=62ac3f050d09c9c849b7e0c6c62ecf8e3185a3bf;hpb=301e09d687a1217130fbb2240b7a80f1a00aacdc;p=libs%2Fgui.git diff --git a/source/input/gesturedetector.cpp b/source/input/gesturedetector.cpp index 62ac3f0..08232cf 100644 --- a/source/input/gesturedetector.cpp +++ b/source/input/gesturedetector.cpp @@ -1,7 +1,7 @@ #define _USE_MATH_DEFINES +#include "gesturedetector.h" #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