[SDL] Greetings, and a question

Ryan C. Gordon icculus at clutteredmind.org
Thu Jul 11 13:15:01 PDT 2002

> What I'm wondering about is a "clean" way for my app to realize that it is
> about ready to have focus taken away from it so it can go to sleep, and
> later wake up when focus has been restored? I'm aware of the method of
> checking the return code of the blit call, but that seems like throwing a
> rock through a window to see if a light comes on. Does the system pump an
> event through by chance?

SDL_ACTIVEEVENT, but you should be checking blit returns, too.

> Also, is there a way to effectively "shut down" SDL and return the desktop
> to normal without doing an SQL_Quit()? I'd like to be able to spew out an
> ASSERT() dialog box on a restored desktop to find out just what happened,
> and to make it clean for my end users just in case this happens.

SDL_Quit() shuts down SDL and returns the desktop to normal.  :)

Why is that a problem? I don't understand.

If you just want to kill the video subsystem, use SDL_QuitSubSystem().


More information about the SDL mailing list