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

Peripheral API v1.1.0: Fix mapping D-pad on RPi for some controllers #10364

Merged
merged 5 commits into from Aug 31, 2016

Conversation

garbear
Copy link
Member

@garbear garbear commented Aug 30, 2016

Some controllers send both a button press and an axis change when the D-pad is pressed. To compensate for this, I added a "cooldown" to Kodi so that input arriving within 50ms would be ignored.

A design decision I made in #8807 was to save the button map to the disk after every button press (it simplified the API). When the button map was saved, it would trigger a refresh, and Kodi would hit the disk another few times to calculate the updated button map. I suspect these disk accesses were adding up to >50ms, which is why Kodi wasn't ignoring the second driver input.

This PR adds a SaveButtonMap() function to the peripheral API and only saves the button map when the button-mapping wizard comes to an end.

Also included is a pot-pourri of improvements, some of which the v1.1.0 bump relies on.

Corresponds to https://github.com/kodi-game/peripheral.joystick/pull/50

@garbear garbear changed the title Peripheral API v1.1.0: Fix mapping D-pad on raspberry pi for some controllers Peripheral API v1.1.0: Fix mapping D-pad on RPi for some controllers Aug 30, 2016
@garbear garbear force-pushed the joystick-fixes branch 6 times, most recently from 4afe168 to d41d546 Compare August 30, 2016 23:07
…d of a union

This also changes the behavior of the button mapping. Previously, every time
a button was mapped, the entire controller's map was sent to the add-on.

Now, only the feature being mapped is sent to the add-on. The add-on is now
responsible for resolving button map conflicts.
@garbear
Copy link
Member Author

garbear commented Aug 31, 2016

Unrelated improvements have been separated out into #10371

jenkins build this please

@garbear garbear merged commit 07d80a2 into xbmc:master Aug 31, 2016
@garbear garbear deleted the joystick-fixes branch September 18, 2016 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants