Re: Why do I get so few points(SDL_MOUSEMOTION) when I move fast
"Ryan C. Gordon" <[email protected]>
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Organization | icculus.org |
| Message-ID | <[email protected]> |
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. --ryan.