Repository navigation
Replies: 3 comments 4 replies
|
macOS's gamepad implementation is based on GLFW, while iOS based on other libs like SDL. There is no strong reason to stick to GLFW's implementation. We can switch the implementation if we want. |
|
Circling back to this now that we have the rumble part in place for iOS. One todo item is looking at switching from Cgo to purego for the implementation. This should be straight forward to look at so I'm not concerned about it. The other item is fallback from GCController to IOKit because GC doesn't support as many devices as we can with IOK. Specifically, older gamepads. I don't think automatic fallback can be supported if not detected as GC supported. Reasons I don't think this is possible.
Number 3 alone makes internal fallback not viable. It looks like the only option is to pick one to be the default and have an env or other type of indicator that tells ebitengine to use one or the other at run time. Or decide to ditch IOK altogether and only support GC on macOS. |
|
@hajimehoshi I see you're doing a lot of refactoring right now. Let me know when you're done and what you'd like me to work on for this. Also, I have a mac, so if you don't, and need me to test anything I can. |
Uh oh!
There was an error while loading. Please reload this page.
I started looking at adding vibrate support to macOS (#2014) and it links to the Force Feedback Framework that is in SDL. The problem with using this framework is that it doesn't support a lot of modern controllers. I attempted it with a PS4 controller and
FFIsForceFeedbackreturned not supported.The ForceFeedback framework is an older API and has been supplanted by the GCContoller API. This is currently being used by iOS. I have this working with macOS (not pretty just testing it out) and vibration does work. The iOS and macOS code for GCContoller is identical and can be shared between the two platforms.
So, my questions are.
All reactions