[SDL] question about handling events
grimfang4 at gmail.com
Thu Jul 28 16:31:30 PDT 2011
It's likely that even though your code is not very readable, it does
something that most of us have done many times before. So don't be worried
about sharing if you think that will help solve your problem. We may be
able to figure it out easier than you expect.
Are you using SDL_PollEvent()? With that controlling an event loop, you can
handle events and display stuff as well.
Uint8 done = 0;
if(event.type == SDL_QUIT)
done = 1;
SDL_FillRect(screen, NULL, 0x000000);
// Draw stuff here
On Thu, Jul 28, 2011 at 6:34 PM, Ivan Radojkovic
<itsa.registers at gmail.com>wrote:
> I am new with SDL.
> I have written an intro to a game, but I cant figure out how to check for
> SDL_QUIT effectively while the animation is running. And the other issue is
> whenever I switch to another window the program stops responding and
> executing. I can give you the code but I am still a beginner and my code is
> not very readable.
> I searched for a solution for a while now but with no luck.
> Thank you in advance.
> Ivan Radojkovic
> SDL mailing list
> SDL at lists.libsdl.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL