Closed ASGAlex closed 2 years ago
Hello, thanks for the contribution. ❤️
This problem was already known but I couldn't think of a solution until then, creating a callback to access the raw bitmask doesn't seem to be an ideal solution yet, but I'll leave it implemented because some controls can return bitmasks that the converter doesn't recognize, besides to support combinations.
About the problem, I was inspired by your example to make the converter recognize more than one button per state, but it only works in buttonMode: ButtonMode.HOLD
for now.
If you want to try to make it work with the other mode it will be greatly appreciated.
For example, when I push "fire" button while "moving", xinput returns bitmask like (XINPUT_GAMEPAD_DPAD_UP | XINPUT_GAMEPAD_A), and InputBitmaskConverter.convertButton return null.
In my case the easiest way was to bring access to raw bitmask and work with it an "old-shcool way":
With bitmask I can handle each button both individually and in combinations. I thing, this functionality should exists while more modern solution is not implemented.