libgdx / Jamepad

A better way to use gamepads in Java
Apache License 2.0
20 stars 13 forks source link

jamepad 2.26.4.0 is broken on mac (PS4 controller) #18

Closed Berstanio closed 1 year ago

Berstanio commented 1 year ago

Tested using a PS4 controller on a mac mini m1 with ventura. To reproduce, just run the gdx-controller test suit. No buttons/axis moves should be caught. 2.24.0.0-SNAPSHOT works fine.

Yontipon commented 1 year ago

If the problem is specifically the change from 2.24.0.0-SNAPSHOT to 2.26.4.0, then it involves something I did.

My changes to Jamepad itself were pretty minimal. I added a return value to a previously-void method, and added a new method, but neither of those things should matter if we aren't using them.

However, two other things changed. The version of SDL we rely on moved from 2.24.0 to 2.26.4 (and our version numbers mimic this). Also, the Github ubuntu image we previously compiled on (18.04) was discontinued, so we now compile on 20.04. Some other changes were made to the workflow files, both to get it to work there, and for future-proofing. All of these changes mostly effect the compiled native code.

What would probably make the most sense is to undo as much as possible, then test one step at a time to see what breaks it. We can't go back to ubuntu-18.04, so first would be to compile the 2.24.0 code on ubuntu-20.04. If that works, update SDL to 2.26.4. Then, finally, make the changes to Jamepad itself.

I don't have a Mac to test with, and I don't currently have a Maven repository to host anything, but I could help produce code for someone else to test. What's to most reasonable process for handling this?

Berstanio commented 1 year ago

My changes to Jamepad itself were pretty minimal. I added a return value to a previously-void method, and added a new method, but neither of those things should matter if we aren't using them.

However, two other things changed. The version of SDL we rely on moved from 2.24.0 to 2.26.4 (and our version numbers mimic this). Also, the Github ubuntu image we previously compiled on (18.04) was discontinued, so we now compile on 20.04. Some other changes were made to the workflow files, both to get it to work there, and for future-proofing. All of these changes mostly effect the compiled native code.

It is for sure the SDL version that broke. Your runner upgrade was only for linux, and the linux runner doesn't build the mac natives. https://github.com/libsdl-org/SDL/releases/tag/release-2.26.5 has been released with some mac and PS4 fixes, might be worth to test to just upgrade

I don't have a Mac to test with, and I don't currently have a Maven repository to host anything, but I could help produce code for someone else to test. What's to most reasonable process for handling this?

A reproducer is just running the gdx-controllers test suite. If it works for you, it's probably a mac issue.

Yontipon commented 1 year ago

A 2.26.5.0-SNAPSHOT is now available. Can you see if that helps?

Berstanio commented 1 year ago

I can confirm 2.26.5.0-SNAPSHOT resolves the issue