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

Fix controller input on the Shield if peripheral.joystick is not present #10695

Merged
merged 1 commit into from Oct 14, 2016

Conversation

@garbear
Copy link
Member

commented Oct 12, 2016

The shield controller sends keypresses when it hasn't been scanned by Kodi, so if no add-on is present to translate joystick input, skip the controller so that it continues sending somewhat-functional keypresses.

Broken out from #10630

@garbear garbear force-pushed the garbear:fix-shield branch from 9f263a8 to 9c5e2ad Oct 12, 2016
@garbear garbear referenced this pull request Oct 12, 2016
18 of 26 tasks complete
@garbear garbear force-pushed the garbear:fix-shield branch from 9c5e2ad to aa78ce6 Oct 12, 2016
@MartijnKaijser MartijnKaijser added this to the Krypton 17.0-beta4 milestone Oct 14, 2016
… input

This was causing a problem on the Shield where the controller would work
until it was scanned as a joystick. Without being scanned, the controller
sends keyboard presses, which avoid the need to be translated by an add-on.
Scanning the controller with no add-on present caused input to break, so
check this case before initializing the joystick.
@garbear garbear force-pushed the garbear:fix-shield branch from aa78ce6 to 3e4ebb7 Oct 14, 2016
@MartijnKaijser

This comment has been minimized.

Copy link
Member

commented Oct 14, 2016

jenkins build and merge

@jenkins4kodi jenkins4kodi merged commit 4c8afea into xbmc:master Oct 14, 2016
1 of 4 checks passed
1 of 4 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
default I've found some spare time so building this now
Details
jenkins4kodi Yeah yeah I'll get to it when i have some time
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@garbear garbear deleted the garbear:fix-shield branch Oct 15, 2016
if (!g_peripherals.GetInstance().GetAddonWithButtonMap(peripheral))
{
CLog::Log(LOGWARNING, "Button mapping add-on not present for %s (%s), skipping", peripheral->Location().c_str(), peripheral->DeviceName().c_str(), peripheral->VendorIdAsString(), peripheral->ProductIdAsString());
return false;

This comment has been minimized.

Copy link
@popcornmix

popcornmix Oct 28, 2016

Member

You have two %s format strings, but four arguments...

@garbear garbear referenced this pull request Feb 2, 2017
96 of 123 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.