Fix Home/Guide button emulation and disable it by default #1311
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The Guide button emulation code instantaneously pressed and released the emulated button, which worked very inconsistently due to the input polling behavior of most apps. Delaying for a short time while the button is down (like Moonlight's button emulation code does) allows the emulated button press to work consistently.
I was surprised to see that Guide emulation is enabled by default. This causes issues with apps/games that use a long press of the Back button for in-game functionality. Since most common controllers have Guide/Home buttons these days and users expect their controller buttons to behave normally out of the box, I've changed Guide button emulation be off by default. I don't expect this to be a major impact, especially because the feature itself was mostly broken prior to this PR.
I rewrote the name and description of the Web UI option for this too, because "Back Button Timeout" wasn't really clearly stating what the feature was doing. The fact that it's the longest you a can press the back button is really a side-effect rather than a description of the user-facing feature that users will be looking for when they search the options.
Screenshot
Issues Fixed or Closed
Fixes #1048
Type of Change
.github/...
)Checklist
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.