Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.2] [HTML5] Use internal implementation of the Gamepad API. #45079

Merged
merged 2 commits into from
Jan 18, 2021

Conversation

Faless
Copy link
Collaborator

@Faless Faless commented Jan 10, 2021

3.2 version of #45078

@Faless Faless added this to the 4.0 milestone Jan 10, 2021
@Faless Faless marked this pull request as draft January 10, 2021 17:11
@Faless Faless force-pushed the js/3.x_gamepads branch 2 times, most recently from 4ee60e5 to 560794b Compare January 18, 2021 10:43
In the core input handling code we have checks to make sure that if axis
rapidly change sign we inject mid-points to release any pending inputmap
action.

The function though, did not correctly insert the mid-point causing
dpads mapped to an axis that behaves like tri-state buttons (-1,0,1) to
not be released correctly.

This commit fixes that by including in the check the case where the axis
swtiches from abs(1) to 0.
No longer use emscripten functions for gamepads, implement them as
library functions in library_godot_display.js instead.
This allows us to do a better job at "guessing" vendorId, productId, OS,
etc. thus allowing us to better find the remapping for the controller.
@Faless Faless marked this pull request as ready for review January 18, 2021 12:26
@akien-mga akien-mga merged commit 0b3540a into godotengine:3.2 Jan 18, 2021
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants