Conversation
Some devices, such as the ROG Ally X and various OneXPlayer devices, emit chord events on release of their extra buttons rather than when a down or up action is taken. These typically trigger in fraction of a millisecond and, if translated directly to userspace, are typically to fast to be handled by userspace. Previously an attempt was done to handle this in target device handling to ensure that each input frame had a distinct event. That caused various issues with events getting turned off when held or events getting stuck on, so it was removed. The problem still exists, however, so it is beneficial to find a universal solution. At 4ms, the event delay is equivalent to 1 frame at 250Hz. Increasing that to 16ms is just under 1 frame at 60Hz, which is the baseline frame pacing for most games and at least 2 input frames for target devices running at 125Hz. - Add a global const to that this can be further tweaked later if necessary. - Increase the minimum event delay to 16ms. This was tested on the ROG Ally X and the Lenovo Legion Go S to ensure that: - The primary complaint is resolved. - Regular events never hit the delay threshold and add input latency when not wanted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Some devices, such as the ROG Ally X and various OneXPlayer devices, emit chord events on release of their extra buttons rather than when a down or up action is taken. These typically trigger in fraction of a millisecond and, if translated directly to userspace, are typically to fast to be handled by userspace. Previously an attempt was done to handle this in target device handling to ensure that each input frame had a distinct event. That caused various issues with events getting turned off when held or events getting stuck on, so it was removed.
The problem still exists, however, so it is beneficial to find a universal solution. At 4ms, the event delay is equivalent to 1 frame at 250Hz. Increasing that to 16ms is just under 1 frame at 60Hz, which is the baseline frame pacing for most games and at least 2 input frames for target devices running at 125Hz.
This was tested on the ROG Ally X and the Lenovo Legion Go S to ensure that: