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

Some joystick inputs are delayed on FreeBSD #740

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

Some joystick inputs are delayed on FreeBSD #740

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 1.2
Reported for operating system, platform: FreeBSD, All

Comments on the original bug report:

On 2013-09-06 20:36:41 +0000, wrote:

Created attachment 1322
A patch to read() multiple times

Some joysticks with high sampling rate need to be read() more fast,
otherwise it delay user inputs due to internal queue.
Especially, an app that issues SDL_PollEvent() not so frequent, such as:

while ( ! done ) {
usleep(10*1000); // <-- some delay
while ( SDL_PollEvent(&event) ) {
:
}
}

It is solved by read()-ing multiple times at once.
(I think this is safe because of O_NONBLOCK mode)

On 2013-09-07 03:54:44 +0000, Sam Lantinga wrote:

Fixed, thanks!
http://hg.libsdl.org/SDL/rev/957d7137867c

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

No branches or pull requests

1 participant