fyhuang / enjoy2

Transform joystick input into keyboard and mouse events (OSX)
MIT License
363 stars 55 forks source link

Is this working in Yosemite? #14

Open geoffyuen opened 9 years ago

geoffyuen commented 9 years ago

It seems to detect a gamepad because I can press the triangle button in the toolbar but it doesn't detect and buttons when they're pressed. Could it be because I'm using a USB adaptor for a Dual Shock 2?

It works fine when booting into my Mavericks drive.

fyhuang commented 9 years ago

Hi geoffyuen, I don't have Yosemite yet and haven't tested it on Yosemite, sorry.

geoffyuen commented 9 years ago

Ah ok. Just some more information: I synced up a Dual Shock 3 and I also have the same problem. The controller works in OpenEmu though.

tolchocker commented 9 years ago

Same issue here. Both Enjoy2 and the previous Enjoy have stopped detecting my usb wired Logitech gamepad after updating to Yosemite.

jeffjenx commented 9 years ago

Same problem here. Tried with a DualShock 3 and a SNES RetroUSB controller. Pressing buttons on the controllers do not open the appropriate control for mapping.

jtzemp commented 9 years ago

So, I'm on a Mavericks (10.9.5) machine, with a Sabrent gamepad, and I'm also having problems. I see Enjoy2 recognizes the device, but it just doesn't jump to the right button. When I try and 'brute force' it by filling in all the details and then just push buttons, I don't get any "keyboard" output.

xaviershay commented 9 years ago

Same issue on 10.9.5 - Buffalo SNES gamepad works on OpenEmu, but not on Enjoy2.

xaviershay commented 9 years ago

The pointer equality test at https://github.com/fyhuang/enjoy2/blob/master/JoystickController.m#L153 is broken and will never return true. There is a related warning you try to compile. I'm investigating a patch.

xaviershay commented 9 years ago

This is totally weird. I instrumented add_callback and input_callback and confirmed that the IOHIDDeviceRef that is being used to register is different from the inSender value that is being passed to the callback.

2015-01-31 13:38:40.234 Enjoy2[87723:303] Registering value callback for 0x60800013c520
2015-01-31 13:38:40.828 Enjoy2[87723:303] Received value callback for 0x608000283e30

https://developer.apple.com/library/mac/documentation/DeviceDrivers/Conceptual/HID/new_api_10_5/tn2187.html#//apple_ref/doc/uid/TP40000970-CH214-SW12 says they should be the same.

I don't know what to do next :/

xaviershay commented 9 years ago

Reverting https://github.com/fyhuang/enjoy2/commit/d298f6751a2138d740bb98c2886e5cdbe206843c fixes for me. I don't know how to reconcile that with documentation, or with behaviour the author of that commit saw ¯\_(ツ)_/¯.

geoffyuen commented 9 years ago

This fork of (the original?) Enjoy works on Yosemite:

https://yukkurigames.com/enjoyable/

I've used it with my Dualshock 3 and DS2 via a usb adaptor. It's quite fully featured too.

They also have a git repo if anyone wants to look at the code.