[SDL] SDL_QUIT problem

Tyler Montbriand tsm at accesscomm.ca
Thu Sep 11 20:45:01 PDT 2003


On Wednesday 10 September 2003 06:47 pm, Paulo V W Radtke wrote:
> I'm having a VERY strange SDL_QUIT problem with SDL1.2.6 in Win32. My game
> is checking for SDL_QUIT messages to shutdown, but something very strange
> is happening. If I leave the game on the title screen for some time, it
> will simply shutdown out of the blue (yep, no error messages, parachutes or
> other stuff). I checked about everything in my code, so I'm sure the bug is
> not mine (maybe it's a problem in Windows, not in SDL). The final test was
> to check if there was an SDL_QUIT message actually sent, and yes, I've got
> on my code an SDL_QUIT message, when there was nothing going on. The
> program shutdowns properly, only problem is that it shouldn't be doing so.
>
> 	I tried it on Mac OS X and it worked wih no problem, it only got the
> SDL_QUIT message when I closed the window. Does anyone had similar
> problems? The most strange is that it will happen only when it's idle, not
> playing the game, so I can play for longer than half an hour and it's fine,
> but if I leave it on my title screen loop it will shut down after just some
> minutes.
>
> 	Paulo
>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl

It's very difficult to say without seeing your code.  :(  And lots of people 
use SDL under Win32 without it generating spontaneous SDL_QUIT messages,
so I wonder if it still is in your code somehow.  A couple things come to 
mind:

-Are you using SDL_PushEvent anywhere?  You might be inserting an SDL_QUIT 
message into the que by accident.
-Check your logic around where it responds to the SDL_QUIT message.  If you're 
using a switch statement, is there a missing 'break' anywhere?  It could be 
falling through from the above case.




More information about the SDL mailing list