as3-controller-input icon indicating copy to clipboard operation
as3-controller-input copied to clipboard

"pressed" and "released" triggered 2 frames in a row.

Open chamberlainpi opened this issue 10 years ago • 0 comments

I'm not sure if it's due to the frameRate (tried at 30 and 60 fps), but seems like my game loop (in EnterFrame) catches two presses and releases in a row even if I just press the controller buttons once.

What seems to fix it though, is changing the >= to > in the pressed() and released() ButtonControl's getters: Example: updatedAt > ControllerInput.previous

Setup: Compiled in FlashDevelop FP12.0

  • Attached 3 XBOX360 controllers (Afterglow brand).

chamberlainpi avatar May 16 '14 19:05 chamberlainpi