You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is also wrong for RETRO_DEVICE_MOUSE - according to https://github.com/libretro/RetroArch/blob/master/libretro-common/include/libretro.h#L158 it should report as long as the touchpad is touched. On a mac trackpad, you can touch to move the cursor around without having to click the pad. So, RETRO_DEVICE_POINTER_PRESSED should be set as long as there is a touch event.
As far as I can tell, the problem is that the current cocoa input driver only reads out the x/y of pointer/mouse, when touch_count > 1 (see
I think the mouse could be fixed in the existing code - I will try that soon, but the pointer is different - current driver doesn't handle trackpad touch events at all, really, just the behaviour of the mouse when you use the trackpad (which is why it doesn't set touch_count until the pad is clicked rather than touched, as the mouse has no concept of touching).
Really it should be using the NSTouch object, which contains all the touch data (if it's touched, how many figures, etc), but I couldn't get it working :)
dankcushions
changed the title
RETRO_DEVICE_MOUSE not working with OSX
RETRO_DEVICE_MOUSE and RETRO_DEVICE_POINTER not working properly with OSX
Sep 1, 2016
I've updated this issue with some new findings, but I'm not able to get anywhere with the trackpad stuff as it requires objective-c and cocoa knowledge, which i'm struggling with! Hopefully someone else does!
In the test core I only get readings readings from the mouse retrieval code (https://github.com/libretro/RetroArch/blob/master/cores/libretro-test/libretro-test.c#L219) when either the left mouse button (for RETRO_DEVICE_MOUSE) is held, or the trackpad (RETRO_DEVICE_POINTER) is held.
This behaviour is wrong for RETRO_DEVICE_MOUSE - according to https://github.com/libretro/RetroArch/blob/master/libretro-common/include/libretro.h#L119 it should report the delta as long as the mouse cursor is in the window. You shouldn't need to click and hold.
It is also wrong for RETRO_DEVICE_MOUSE - according to https://github.com/libretro/RetroArch/blob/master/libretro-common/include/libretro.h#L158 it should report as long as the touchpad is touched. On a mac trackpad, you can touch to move the cursor around without having to click the pad. So, RETRO_DEVICE_POINTER_PRESSED should be set as long as there is a touch event.
As far as I can tell, the problem is that the current cocoa input driver only reads out the x/y of pointer/mouse, when touch_count > 1 (see
RetroArch/input/drivers/cocoa_input.c
Line 150 in 0a613c0
RetroArch/input/drivers/cocoa_input.c
Line 227 in 0a613c0
RetroArch/ui/drivers/ui_cocoa.m
Line 148 in 35b48bc
I think the mouse could be fixed in the existing code - I will try that soon, but the pointer is different - current driver doesn't handle trackpad touch events at all, really, just the behaviour of the mouse when you use the trackpad (which is why it doesn't set touch_count until the pad is clicked rather than touched, as the mouse has no concept of touching).
Really it should be using the NSTouch object, which contains all the touch data (if it's touched, how many figures, etc), but I couldn't get it working :)
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: