garbear / xbmc

XBMC Main Repository
http://xbmc.org
Other
132 stars 53 forks source link

Replaced deviceName with Location #119

Closed cool-pants closed 4 years ago

cool-pants commented 4 years ago

Description

Replaced the use of deviceName with that of location for IButtonMap Replaces https://github.com/garbear/xbmc/pull/118#event-3489956838

Motivation and Context

Earlier the configuration wizard blocked input while mapping based on the device name of peripherals. This means two peripherals with different names won't be able to interfere which each other's mapping process. but at the same time, two with the same name could be mapped to a singular virtual device. This was fixed using the peripheral location instead of the name.

How Has This Been Tested?

Tested using two controllers of the same model and trying to configure both to the same virtual device at the same time. Now only the peripheral which initiates the wizard will be mapped while the input from the other controller will be ignored. The code was compiled without any issues as well.

Screenshots (if appropriate):

Types of change

Checklist:

garbear commented 4 years ago

This looks perfect. I'll include it in a test build and do some testing when I get a chance. btw, if you make a mistake in a PR, you can rewrite history with an interactive rebase and force-push to the existing branch. GitHub will update to show the most recent version.

If you do need to open a second PR, then you should link the two. Comment on the old PR with the following:

Superseded by https://github.com/garbear/xbmc/pull/119

Then, in this PR's description, you should link to PRs that are related to this one. I would modify the description to say:

Replaces https://github.com/garbear/xbmc/pull/118#event-3489956838

You'll notice that GitHub injects links wherever PRs are mentions, allowing for extensive and later-helpful linking.

garbear commented 4 years ago

@cool-pants can you cherry-pick 9adcb554a67dd2eb0196d6401dece298c6421ada? I confirmed that the PR works with this patch, we can merge once it's squashed.

cool-pants commented 4 years ago

I couldn't cherry-pick the commit for some reason due to Merge conflicts and such, so I created a new Commit for the same.

garbear commented 4 years ago

Excellent! Can you squash into a single commit? You can do this with an interactive rebase, like git rebase -i HEAD~2. If you mess up, just hard reset to git reset --hard dd135fe and try again.