fyhuang / enjoy2

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

Fix broken joystick event detection #25

Closed bji closed 1 year ago

bji commented 8 years ago

I am using Mac OS X version 10.8.2 with an XBOX 360 Controller via the tattiebogle driver.

I found that no events appeared to be detected by the Enjoy2 UI.

I diagnosed the problem as the "inSender" parameter of the input_callback not being passed as the device. It appears to be a value unrelated to the actual joystick device.

It would seem safer to simply store the controller pointer in the joystick and make the joystick be the callback data. Then you don't have to try to look the joystick up by device id.

I made this change and Enjoy2 started working for my controller.

I am not an Objective-C programmer and I had to figure out the syntax of and correct approach for the code change as I went. My apologies if the style is bad or the change is in some way deficient.

acook commented 8 years ago

Is there a reason this hasn't been merged?

bjitivo commented 8 years ago

I think the project appears to be generally not maintained ...

acook commented 8 years ago

Ah, so it is. Is there a maintained fork that you know of?

bjitivo commented 8 years ago

Not that I know of, sorry. But for those few people who care about this, you are welcome to use my fork at https://github.com/bji/enjoy2 ... I am not maintaining that either, but at least it has the fixes.

bji commented 1 year ago

OK well I give up.