Software mouse pointer probs

When I display the SDL ‘hardware’ mouse cursor, and also blit an image at
the
SDL_GetMouseState(&mouse_x, &mouse_y) location just before calling flip
display, I find that the blitted image lags behind the hardware cursor by a
considerable amount.

Am I being really ridiculously stupid? Why doest this happen? :frowning:

When I display the SDL ‘hardware’ mouse cursor, and also blit an image at
the
SDL_GetMouseState(&mouse_x, &mouse_y) location just before calling flip
display, I find that the blitted image lags behind the hardware cursor by a
considerable amount.

Make sure that you’re doing:
while ( SDL_PollEvent(…) ) {
process event …
}
in your main loop before you draw.

Processing mouse events updates SDL’s internal mouse state.

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