Open ddnava opened 8 years ago
I looked into the trackpad for another purpose, and gave up, but for anyone else: the trackpad on macbooks counts as a RETRO_DEVICE_POINTER, but it doesn't populate the coords unless you click the trackpad, or click and drag. This is because the current cocoa input driver seems to only want to update pointers when there's a 'touch', but it only counts an actual click as a 'touch'.
There's a few trackpad-specific NS events that probably need to be used for trackpads to track touches properly: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/HandlingTouchEvents/HandlingTouchEvents.html
having said that, for something like the NDS, maybe the current behaviour is right, where you need to click and drag to get it to register? I think it might just be a matter of implementing RETRO_DEVICE_POINTER in the DS core.
Playing NDS games can be difficult on a computer, so instead of pointing and clicking, a great alternative would be to map the trackpad to the NDS touchscreen. I know it's possible (at least on OSX) because Apple let's users use the trackpad to sign e-mails and there are some third-party apps that use it in a similar fashion, like Inklet, which uses the trackpad to draw. I know it would be awkward on some games, but some others like Metroid Prime Hunters and Mario Slam Basketball would really benefit of it.
Edit: I found this thread showing how to retrieve absolute trackpad coordinates for OS X: http://stackoverflow.com/questions/3573276/know-the-position-of-the-finger-in-the-trackpad-under-mac-os-x