Custom mouse cursor

Hello!

Is there any way to get proper work of custom mouse cursor (I mean my own
sprite, moved on_mouse_motion event).
When I just update cursor sprite’s coords on SDL_MOUSEMOTION event - there
is inertion movement etc. (cursor moves after you stop move the mouse).

Please tell me the way to implement this, or just tell me URL to source
code…

Thanks a lot in advance.—
Evgeny

Hello!

Is there any way to get proper work of custom mouse cursor (I mean my own
sprite, moved on_mouse_motion event).
When I just update cursor sprite’s coords on SDL_MOUSEMOTION event - there
is inertion movement etc. (cursor moves after you stop move the mouse).

This is usually caused by only reading one event per frame.

e.g.
DoStuff() {
SDL_Event event;
if ( SDL_PollEvent(&event) > 0 ) …
}

Instead you should drain all pending events at once:
DoStuff() {
SDL_Event event;
while ( SDL_PollEvent(&event) > 0 ) …
}

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment