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

SDL_WaitEvent() randomly stalls with events pending (2.0.10 regression) #3355

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 1 comment
Closed
Assignees
Milestone

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 2.0.10
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2019-08-02 19:44:46 +0000, Andrew Church wrote:

In SDL 2.0.10, SDL_WaitEvent() can stall for a short but noticeable period of time (200-300ms?) even while events are pending. I observed this as seeing joystick input seem to drop out once every few seconds using a udev-based controller (specifically a Sony DualShock 3).

This does not occur in SDL 2.0.9.

Sample code (spin an analog stick and watch for the event counter to pause):

#include <assert.h>
#include <stdio.h>
#include <SDL2/SDL.h>
int main(void)
{
int counter = 0;
SDL_Init(SDL_INIT_EVERYTHING);
assert(SDL_NumJoysticks() >= 1);
SDL_Joystick *js = SDL_JoystickOpen(0);
assert(js);
for (;;) {
SDL_Event event;
SDL_WaitEvent(&event);
printf("event %d\n", counter++);
}
}

On 2019-08-06 06:49:45 +0000, Sam Lantinga wrote:

Ryan, can you look at this ASAP?

@slouken slouken self-assigned this Nov 10, 2021
@slouken slouken added this to the 2.0.18 milestone Nov 10, 2021
@slouken
Copy link
Collaborator

slouken commented Nov 10, 2021

I believe this is fixed in 2.0.18. Please reopen this bug if you are still seeing this.

@slouken slouken closed this as completed Nov 10, 2021
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

2 participants