Skip to content

evdev: Support batch reading of input events on Linux #163

Open
klemmm wants to merge 1 commit into
parsec-cloud:stablefrom
klemmm:fix-evdev-event-batch
Open

evdev: Support batch reading of input events on Linux #163
klemmm wants to merge 1 commit into
parsec-cloud:stablefrom
klemmm:fix-evdev-event-batch

Conversation

@klemmm

@klemmm klemmm commented Jul 21, 2025

Copy link
Copy Markdown

Read multiple events per read() call instead of one-by-one. This prevents input loss when the app loop runs slower than the event rate.

This is necessary with "chatty" gamepads, such as the DualShock4 in bluetooth mode with the recent hid-playstation driver, which generates 1000+ events per seconds.

Reproduce with: https://github.com/klemmm/libmatoya/blob/master/test/src/reproduce_problem.c

Read multiple events per `read()` call instead of one-by-one.
This prevents input loss when the app loop runs slower than the event
rate.
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