Unity has been combining XInput and HID for XInput controllers for years on Windows using the L/R trigger values from XInput and the name and other elements from the HID device. This is an XInput limitation and cannot be worked around reliably. This is one of the most common questions I get from Rewired users. Of course, this step will require acceptance on the part of the Love devs themselves, but the ability to create your own modules in C++ would certainly be a feature that more advanced developers would appreciate, and would contribute very strongly to the value of Love as a full scale game development tool.Click to expand.The console is not using XInput to display that information, it's using information from the HID device. My next steps is to make it into its own Module, and if need be, modify love's source directly to support dynamic module drop in, so that I can simply ship a DLL which you can put in your love directory if you want it, and have it work, without actually modifying love itself. That all being said, I am sharing this because I am going to do it anyway, and I expect there are probably a few devs out there who will appreciate the extra features this brings to Love2D. I don't know how well these things work without Xinput, if at all.įifth, you get proper vibration support, which SDL doesn't support at all. I have a Forza racing wheel that I'll test as well at some point. I've tested with a Guitar Hero 2 guitar, for example. Holding both triggers is the same as not holding the triggers at all.įourth, supporting Xinput gives direct support for a ton of really awesome controllers. Third, the problem with non-XInput libraries is that without special drivers customized for the xbox 360 controllers, the triggers will never function properly, because to standard joystick libraries, both triggers read as the same axis, which means they are impossible to distinguish at run time. Second, the reason everyone supports xbox 360 controllers is that they are the most common controller out there which you can simply plug into your system and have it work. This was my proof of concept in order to make sure the idea was even possible. much harder to integrate changes to the love codebase for people making their own exe if the love devs don't accept the changesįirst, this is just an alpha so for now it flat out replaces the joystick module. need to write new input code in love apps to support xbox functionality easy for love devs to pull changes safely can be built API compatible with Joystick inability to easily use old SDL joystick code may break existing non-xbox controller functionality still works with all your existing love code In either case, if the love devs don't want to pull in my changes, adding support for my changes will require building your own love executable. Also, SDL and Xinput can coexist side by side, so I'm thinking at this point rather than making a replacement module for joystick (so that love.joystick.* just magically works with a 360 controller), making a completely new module (love.xinput.*). Extra benefits will be proper support for all those fun xbox accessories with USB connectors (like wheels, guitars, etc).Īs I'm writing a drop-in replacement module for Joystick, I'm realizing more and more than the xinput paradigm doesn't match that of SDL. The benefit of this will be: Proper working triggers on xbox controllers, as well as support for gamepad vibration. Hey all, because there isn't native support for Xinput in Love, and thus Xbox controllers, I've decided to add it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |