The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.
Simple Directmedia Layer Forums
Input latency bug
Joined: 31 Jan 2017
Posted: Wed Feb 01, 2017 6:36 am
I'm using win8 and my 20 years experience developing games. I have a very simple program that
1. create a window with shown + fullscreen
2. create a renderer with vsync + accelerated
3. game loop
4. pollEvents loop
5. render some sprites
6. go to 3.
I started noticing the mouse events seemed laggy. So I benched frame time: 16ms. I deactivated vsync, frame time: 2ms. Render way more sprite so that frame time goes to 16ms without vsync. Mouse input lag not there. Remove additional sprites rendering, then turn off fullscreen and turn vsync on again. No lag. Try fullscreen_desktop + vsync. No lag.
conclusion: [win8 +] vsync + fullscreen = input lag