[SDL] Why do I get so few points(SDL_MOUSEMOTION) when I move fast

Ryan C. Gordon icculus at icculus.org
Thu Sep 15 11:19:47 PDT 2016

On 9/13/16 5:03 PM, Ismael Serrano wrote:
> Or you can get the current position on the update and compare with the
> previous to check if there is any difference.
> |    ||///--- Update the current state of the mouse|
> |    ||m_uCurrentMouseState=SDL_GetMouseState(&m_iCurrentCoordX,
> &m_iCurrentCoordY);|

To be clear: SDL_GetMouseState() returns the last-known mouse positions, 
based on what events the OS has previously sent. It's more convenient in 
some cases than relying on SDL's event loop, but it's not any more accurate.


More information about the SDL mailing list