Hi, awesome people using/making HaxeFlixel! Happy holidays everyone :)
I'm having some trouble with my xbox gamepad and HaxeFlixel.
Everything was working just fine somewhere between HaxeFlixel 3.3.1 and 3.3.3. After updating back then (and not touching my input management code at all), the gamepad stopped working in my windows build. Now I'm running 3.3.6 and the flash build is still working as expected, but FlxGamepad.pressed() returns false for whatever XboxButtonId I pass as parameter.
I compiled the GamepadTest demo and I got even weirder results: the A, B, X and Y buttons are detected as the DPAD, the DPAD does nothing at all, R and L are Select and Start, and so on.
My haxelib list:
actuate: [1.7.5]
fb-haxe-android: [dev:d:\Projects\openfl\fb-haxe-android]
flixel-addons: [1.1.0]
flixel-demos: [1.1.1]
flixel-templates: [1.0.2]
flixel-tools: [1.0.2]
flixel-ui: [1.0.2]
flixel: 3.3.4 3.3.5 [3.3.6]
hxcpp: 3.1.39 [3.1.48]
lime-tools: [1.5.7]
lime: 2.0.0 2.0.0-alpha.5 2.0.0-alpha.6 2.0.0-alpha.7 2.0.0-alpha.8 2.0.1 [2.0.2]
nape: [2.0.16]
openfl: 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 [2.1.8]
softkeyboardhelper: [dev:d:\Projects\openfl\softkeyboardhelper]
The way I'm getting the input is pretty straightforward:
1. I get a gamepad ID here
https://github.com/stinkfist-/battlepong/blob/master/source/game/Court.hx#L106
2. I get the gamepad with that ID in my input manager, here:
https://github.com/stinkfist-/battlepong/blob/master/source/input/InputHandler.hx#L20
3. I check for input this way:
https://github.com/stinkfist-/battlepong/blob/master/source/input/InputHandler.hx#L284. The player asks its input manager if a button is pressed like this:
https://github.com/stinkfist-/battlepong/blob/master/source/game/Player.hx#L81Am I doing something wrong?
It works fine in flash. It does nothing in windows. I'll try a linux build tomorrow, as well as downgrading HaxeFlixel/Lime/OpenFL to previous versions.
Thanks in advance!