SDL_PollEvent() stuttering while idle?

后端 未结 1 918
生来不讨喜
生来不讨喜 2020-12-09 10:29

I\'ve cobbled together a very basic game loop in C++ using SDL2, and I\'ve noticed that every few seconds, SDL_PollEvent seems to be unusually slow, even when nothing is hap

相关标签:
1条回答
  • 2020-12-09 11:10

    I'm still not sure exactly what is causing the problem, but it certainly has something to do with USB devices. The more devices plugged in, the longer the latency spike, and it occurs almost every 3000ms exactly.

    I rolled back from SDL2-2.0.9 to SDL2-2.0.8, and the issue has stopped.

    EDIT: Changeset found at https://hg.libsdl.org/SDL/rev/9091b20040cf appears to resolve this issue in SDL2-2.0.9.

    0 讨论(0)
提交回复
热议问题