[SDL] using an image as mouse cursor

Lucas Clemente Vella lvella at uai.com.br
Sat Jan 22 09:23:06 PST 2005


>>change your 'if (SDL_PollEvent ...)' to a 'while (SDL_PollEvent)'
>>
> 
> Well, yes, that was the problem. But I still dont get the difference
> between processing with if and processing with while.

While you move your mouse from a point to another, you get a lots of 
events (one for each time the computer reads the mouse, I believe). 
Using if, you process one event per frame, while using while, you 
process all events at once, getting the cursor to the final destination 
of the mouse in one frame.

-- 
Lucas Clemente Vella
lvella at uai.com.br




More information about the SDL mailing list