record multiple slots for multi-touch input

for now, only slot 0 is parsed, the rest are ignored.
This commit is contained in:
Qingping Hou
2013-02-27 16:04:28 +08:00
parent 253a18b7b2
commit d4e2cb708e
2 changed files with 52 additions and 11 deletions

View File

@@ -74,6 +74,10 @@ GestureDetector = {
}
function GestureDetector:feedEvent(tev)
-- for now, only handle single point touch
if tev.slot ~= 0 then
return nil
end
re = self.state(self, tev)
if tev.id ~= -1 then
self.last_tev = tev
@@ -260,6 +264,7 @@ function GestureDetector:panState(tev)
-- end of pan, signal swipe gesture if necessary
swipe_direct = self:isSwipe()
if swipe_direct then
DEBUG("swipe detected!")
local start_pos = Geom:new{
x = self.first_tev.x,
y = self.first_tev.y,