[SDL] using an image as mouse cursor

Roger D. Vargas roger at ehtsc.co.cu
Tue Jan 25 03:46:51 PST 2005


El mar, 25-01-2005 a las 14:47, Olof Bjarnason escribió:
> Think of the event queue like a QUEUE; if there are several clients
> (events) waiting today (this time around the loop), you may want to
> serve all of them today (this time around the loop) and not tomorrow
> (next time around the loop), because otherwise the queue will soon
> reach all over town (the event queue will fill up). The while loop
> takes care of the events this time around the loop, and the if takes
> "one customer per day"!
Well, my problem is i was considering this queue as infinite, I mean, I
thought there is ALWAYS an event in the queue, because always the users
is moving mouse, clicking or pressing keys.

> 
> /Olof
> 
> 
> On Mon, 24 Jan 2005 11:25:58 +0000, Roger D. Vargas <roger at ehtsc.co.cu> wrote:
> > El sáb, 22-01-2005 a las 17:58, Clemens Kirchgatterer escribió:
> > > "Roger D. Vargas" <roger at ehtsc.co.cu> wrote:
> > >
> > > > > most likely you process one event at a time instead of all events in
> > > > > the queue.
> > > > >
> > > > > 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.
> > >
> > > do you have a SDL_Delay() or usleep() somewhere in your eventloop? if
> > > yes - think about it a little bit. :)
> > No, i have a delay but out of event processing, inside game processing
> > loop.
> > 
> > >
> > > _______________________________________________
> > > SDL mailing list
> > > SDL at libsdl.org
> > > http://www.libsdl.org/mailman/listinfo/sdl
> > --
> > Roger D. Vargas
> > Linux user #180787
> > ICQ: 117641572
> > * No hay nada tan importante que no pueda ser olvidado *
> > Alzheimer
> > 
> > _______________________________________________
> > SDL mailing list
> > SDL at libsdl.org
> > http://www.libsdl.org/mailman/listinfo/sdl
> >
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
-- 
Roger D. Vargas
Linux user #180787
ICQ: 117641572
* No hay nada tan importante que no pueda ser olvidado *
Alzheimer





More information about the SDL mailing list