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 broken controller input in games #14658

Merged
merged 1 commit into from Oct 21, 2018

Conversation

@garbear
Copy link
Member

commented Oct 21, 2018

This fixes a bug introduced in #14508. Allow me to quote myself:

There was a rebase error so I included three refactors from my retroplayer-18beta3 branch. These have been in the test builds for quite a while, so not too risky I hope.

Although these commits were in my test branch, a single line was located in the wrong commit, which wasn't included. This PR imports that line.

Closes #14654.

Motivation and Context

Reported by @AlwinEsch here: #14654

How Has This Been Tested?

Tested on Linux X11 64-bit. Before no input in games, after working input in games.

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)
The missing line added by this commit appears in my personal retroplayer
branch, but was omitted from the last PR to master.
@garbear

This comment has been minimized.

Copy link
Member Author

commented Oct 21, 2018

Reported fixed by @AlwinEsch

@garbear garbear merged commit fe875cf into xbmc:master Oct 21, 2018
1 check passed
1 check passed
default You're awesome. Have a cookie
Details
@garbear garbear deleted the garbear:fix-controllers branch Oct 22, 2018
@Rechi Rechi added this to the Leia 18.0-beta4 milestone Oct 22, 2018
@natethomas

This comment has been minimized.

Copy link
Member

commented Nov 10, 2018

FYI, per reports this does not appear to have solved controller issues for Shield. Not sure if only shield or all android.

@garbear

This comment has been minimized.

Copy link
Member Author

commented Nov 10, 2018

@da-anda and i figured it out was because the controller was player two and there was a phantom controller for player one. this can be seen in the peripherals dialog in input settings. ultimately we needa player manager. any ideas on how we can handle this for release?

@da-anda

This comment has been minimized.

Copy link
Member

commented Nov 10, 2018

@garbear

This comment has been minimized.

Copy link
Member Author

commented Nov 10, 2018

how about treating the last used controller device before a game is started as controller for player one?

this is a good solution. I'll make an issue for it.

show a basic dialog that requests the user to press any key on the controller he would like to use for this gaming session

how would you get to this dialog in the GUI?

@da-anda

This comment has been minimized.

Copy link
Member

commented Nov 11, 2018

show a basic dialog that requests the user to press any key on the controller he would like to use for this gaming session

how would you get to this dialog in the GUI?

When a game is launched, I'd check if there is more than one game controller available and if so, fire that dialog and ask the user which of the controllers to use as primary controller. We could remember the users decision for as long as the list of connected controllers doesn't change (no new controller, no controller disconnected/turned off etc). To do this, we could create a hash based on unique identifiers (HW id?) of all currently connected controllers and then store this aggregated hash along with the ID of the users preferred controller (result of the dialog) in some hidden setting (using our settings system) or a new XML (like sources.xml, upnpservers.xml, ...). If controller list changes, we can either just clear the preference and show the dialog again if there are still more then one controller connected (in which case we only ever remember the very last controller preference), or we could aggregate some sort of history of connected controller combinations (hashes) and check against that history of "hash > primary controller" preferences.
And in order for the user to be able to change the primary controller, I'd add a new option to the game menu "change/select primary controller" (or some other label, if you have a better idea) and trigger the very same dialog again.

What do you think?

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.