Hey,
I’m currently working on implementing gamepad-support for my project. However it does not seem to work. I’ve put the example of the latest october-blog in my main-function:
import lime.ui.Gamepad;
import lime.ui.GamepadAxis;
import lime.ui.GamepadButton;
class Main extends Sprite {
public function new () {
super();
trace(Gamepad.devices); //Outputs "{}"
Gamepad.onConnect.add (function (gamepad) {
trace ("Connected Gamepad: " + gamepad.name); //No output
gamepad.onAxisMove.add (function (axis:GamepadAxis, value:Float) {
trace ("Moved Axis " + axis + ": " + value);
});
gamepad.onButtonDown.add (function (button:GamepadButton) {
trace ("Pressed Button: " + button);
});
gamepad.onButtonUp.add (function (button:GamepadButton) {
trace ("Released Button: " + button);
});
gamepad.onDisconnect.add (function () {
trace ("Disconnected Gamepad");
});
});
}
}
I tested my controller on several other games and I’m on lime version 2.6.9 and openfl 3.3.9.
Thanks in advance!