2D Toolkit Forum

2D Toolkit => Support => Topic started by: johannes on February 27, 2014, 07:13:09 pm

Title: Bug: Tapping on touchpad on macs often fail
Post by: johannes on February 27, 2014, 07:13:09 pm
The code for handling clicks (tk2dUIManager.CheckInputs) doesn't support the case where Input.GetMouseButtonDown(0) and Input.GetMouseButtonUp(0) are true at the same time. This happens when you have a very rapid click. Such clicks are often generated in OS X when tapping on a touchpad.

I patched it locally, but the code is really not written with it in mind. I don't want to refactor too much on my local copy, so it would be nice if this could be fixed in the official version.

Thanks.
Title: Re: Bug: Tapping on touchpad on macs often fail
Post by: unikronsoftware on February 27, 2014, 09:08:32 pm
Hmm interesting. Can I reproduce this on all MacBooks or is it specific to certain combinations? I can't say I've noticed this on my 15" retina mbp
Title: Re: Bug: Tapping on touchpad on macs often fail
Post by: johannes on February 28, 2014, 10:52:59 pm
I'm not sure. I can't reproduce it every time, but it happens many times each play session.

I have a MacBook Air, Mid 2011, running OS X 10.9.1, and unity 4.3.4f1.

I'm going to guess that this has to do with the framerate, actually. If I can get one click in within a frame, both down and up will trigger.

I also use tapping the touchpad, not clicking. This might also reduce the time.
Title: Re: Bug: Tapping on touchpad on macs often fail
Post by: unikronsoftware on March 01, 2014, 07:08:40 pm
I'll try to reproduce this with tapping turned on. Should be fixable if I can reproduce this.
Title: Re: Bug: Tapping on touchpad on macs often fail
Post by: johannes on March 01, 2014, 08:48:52 pm
Thanks!
Title: Re: Bug: Tapping on touchpad on macs often fail
Post by: fsadeq on March 02, 2014, 12:51:33 am
I can verify this happens to me as well.