{"action":"created","issue":{"url":"https://api.github.com/repos/melonjs/melonJS/issues/880","repository_url":"https://api.github.com/repos/melonjs/melonJS","labels_url":"https://api.github.com/repos/melonjs/melonJS/issues/880/labels{/name}","comments_url":"https://api.github.com/repos/melonjs/melonJS/issues/880/comments","events_url":"https://api.github.com/repos/melonjs/melonJS/issues/880/events","html_url":"https://github.com/melonjs/melonJS/issues/880","id":214894366,"number":880,"title":"Gamepads with low polling rates have axes stuck","user":{"login":"jdkendall","id":15385174,"avatar_url":"https://avatars1.githubusercontent.com/u/15385174?v=3","gravatar_id":"","url":"https://api.github.com/users/jdkendall","html_url":"https://github.com/jdkendall","followers_url":"https://api.github.com/users/jdkendall/followers","following_url":"https://api.github.com/users/jdkendall/following{/other_user}","gists_url":"https://api.github.com/users/jdkendall/gists{/gist_id}","starred_url":"https://api.github.com/users/jdkendall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdkendall/subscriptions","organizations_url":"https://api.github.com/users/jdkendall/orgs","repos_url":"https://api.github.com/users/jdkendall/repos","events_url":"https://api.github.com/users/jdkendall/events{/privacy}","received_events_url":"https://api.github.com/users/jdkendall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-03-17T02:54:49Z","updated_at":"2017-03-17T05:34:48Z","closed_at":null,"body":"#### Expected behavior\r\nShifting quickly between opposite directions on an axis (up to down, left to right) should register the old axis direction as unpressed and the new axis direction as pressed.\r\n\r\n#### Actual behavior\r\nOn slower polling controllers (like the SFC30 on Linux) the MelonJS engine sometimes does not catch an intermediary 0 state that unpresses the old axis direction before pressing the new axis direction.\r\n\r\n#### Steps to replicate (should work with any controller)\r\n- Hold one direction on an axis on the gamepad.\r\n- Trigger a breakpoint at line 285 of `src/input/gamepad.js` (final line of binding axes iteration function)\r\n- While breakpoint is stopping code, release direction and press opposite direction on same axis\r\n- Resume code\r\n\r\nIf done correctly, the engine will report both directions as being pressed, with the only solution to release the axis back below the pressed threshold."},"comment":{"url":"https://api.github.com/repos/melonjs/melonJS/issues/comments/287271177","html_url":"https://github.com/melonjs/melonJS/issues/880#issuecomment-287271177","issue_url":"https://api.github.com/repos/melonjs/melonJS/issues/880","id":287271177,"user":{"login":"jdkendall","id":15385174,"avatar_url":"https://avatars1.githubusercontent.com/u/15385174?v=3","gravatar_id":"","url":"https://api.github.com/users/jdkendall","html_url":"https://github.com/jdkendall","followers_url":"https://api.github.com/users/jdkendall/followers","following_url":"https://api.github.com/users/jdkendall/following{/other_user}","gists_url":"https://api.github.com/users/jdkendall/gists{/gist_id}","starred_url":"https://api.github.com/users/jdkendall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdkendall/subscriptions","organizations_url":"https://api.github.com/users/jdkendall/orgs","repos_url":"https://api.github.com/users/jdkendall/repos","events_url":"https://api.github.com/users/jdkendall/events{/privacy}","received_events_url":"https://api.github.com/users/jdkendall/received_events","type":"User","site_admin":false},"created_at":"2017-03-17T05:34:47Z","updated_at":"2017-03-17T05:34:47Z","body":"You work fast, @parasyte ! Looks good to me, just tested it out and my gamepad is working flawlessly now. Thank you! :)"}}
{"actor":{"display_login":"jdkendall"}}