When compiled with emscripten, the below code works as expected on my Android phone, but when I run it on my ipad I get strange behavior: if I put two fingers down on the screen and then lift one of them, two SDL_FINGERUP events are detected, and then if I move the remaining finger there will be a SDL_FINGERDOWN event followed by an SDL_FINGERMOTION event.
At first I suspected it might have been my ipad, but when I ran the demo on this page, it worked as expected (only one "touchend" event is triggered when I lift one of the two fingers: http://tomicloud.com/2012/03/multi-touch-demo Has anyone else encountered this, and know of a workaround? Thanks. #include <SDL2/SDL.h> #include <emscripten.h> void mainloop() { SDL_Event event; while(SDL_PollEvent(&event)) { switch(event.type) { case SDL_FINGERDOWN: printf("DOWN Id: %d\n", event.tfinger.fingerId); break; case SDL_FINGERUP: printf("UP Id: %d\n", event.tfinger.fingerId); break; case SDL_FINGERMOTION: printf("MOVE Id: %d\n", event.tfinger.fingerId); break; } } } int main(int a, char* g[]) { SDL_Init(SDL_INIT_VIDEO); SDL_CreateWindow( "Test", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED , 480, 360, 0); emscripten_set_main_loop(mainloop, 0, 1); return 0; } -- 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.
