Thank you Floh! I actually found a solution to the problem on this website:
https://github.com/kripken/emscripten/issues/5012 Basically, you're right that the isChanged field is supposed to convey the information to the user, but it wasn't being set properly on some platforms - the Javascript code on the above link fixes the problem (and I was able to confirm the fix). John On Tuesday, September 11, 2018 at 8:00:50 AM UTC-4, Floh wrote: > > I think the "isChanged" member in EmscriptenTouchPoint gives you this > information, together with the "identifier" member to associate the touch > point with touches in previous events. > > Basically, when you get a TOUCHEND event, the touch point(s) which have > isChanged set to true should be the ones that have been 'lifted', and the > other touch points are the state of the remaining active touches > > Interestingly I just noticed that in my own gesture recognizer (copied > more or less from the Android NDK), the isChanged information isn't even > used, the recognizers just get the same information from some followup > event (e.g. a MOVE) which has fewer touch points then expected. > > Cheers! > -Floh. > > On Monday, 10 September 2018 23:39:48 UTC+2, McLaurin Entertainment wrote: >> >> I am using Emscripten to get a number of C++ games running under HTML5. >> The client requires that these games also run in a mobile web browser, they >> do not want to make a native app. >> >> The games require me to properly handle multitouch events - if the user >> applies three fingers to the screen, I have to react accordingly to all >> three fingers. However, I'm seeing an issue when testing on Safari on an >> iPad Mini, and I expect it happens elsewhere as well (though so far I'm not >> seeing it on Android). >> >> What I'm finding is that when a touch callback is hit, for instance if I >> set a callback via emscripten_set_touchend_callback, then whenever a >> touchend event occurs, that callback gets hit with all active touchpoints >> included in the EmscriptenTouchEvent. As such, I don't know which >> touchpoint the event applies to. For instance if three fingers are down, >> and you lift the second finger, all three touchpoints are passed to the >> touchend callback. Is there a way for me to determine which touchpoint the >> touchend event applies to? If this is a bug, is there a known workaround? >> >> Thank you in advance. >> >> John >> >> >> >> -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
