Skip to content

fix(Composite Device): Increase minimum event delay. - #720

Open
pastaq wants to merge 1 commit into
mainfrom
pastaq/delayed_events
Open

pastaq wants to merge 1 commit into
mainfrom
pastaq/delayed_events

Conversation

@pastaq

@pastaq pastaq commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant