aerys / minko

3D framework for web, desktop and mobile devices.
http://minko.io
Other
904 stars 210 forks source link

Mouse events unusable on MacBook #258

Open swiftcoder opened 7 years ago

swiftcoder commented 7 years ago

Minko updates the Mouse x, y, dX, and dY fields on both SDL_MOUSEMOVE and SDL_FINGERMOTION events. Unfortunately, the trackpad on a MacBook (presumably also an external Magic Trackpad) produces both types of events for every single interaction.

This causes the deltas to be doubled by the time each mouse event arrives, and the x, y coordinates are all over the place.

swiftcoder commented 7 years ago

I think the easiest approach would be not to just exclude FINGERMOTION data from the Mouse when (TARGET_OS_MAC && !TARGET_OS_IPHONE).

However, it may be worth considering whether mouse events should be simulated at all on mobile, since SDL seems to have stopped doing that.