[HL] Implement gamepad connected/vendor/id and fix float value conversion #1473
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements
gamepad.connected
,gamepad.vendor
andgamepad.id
on HL, and fixes wrong axis and button values due to the previously missing conversion between floats used by Kinc and doubles used by Haxe.I would also really like to implement the mentioned gamepad properties for Armorcore, but since Armory uses Kode's version of Kha (plus some minor adjustments Lubos manually applies after each update which I can't influence with a PR) this means that I would also need to implement the changes for Kode/Krom to make Kha work in all cases, but Kode/Krom doesn't build at the moment... @ Rob it would be awesome if you can implement the gamepad properties for Kode/Krom so that adding these to Kha's Krom backend would work correctly independent of whether Krom or Armorcore is used.
Slightly off-topic question: for gamepad sticks, how should the y-axis behave? Should a y value of 1 correspond to "stick up" or "stick down"? Currently the y axis seems to be inverted on html5 compared to all the other targets: armory3d/armory#2886 (comment).