SDL_Quit or SDL_QuitSubSystem

Hi All,
When calling SDL_Quit or SDL_QuitSubSystem, SDL not only kills the
window that it spawn, but also kills the application too. So it would
seem that there is a wild WM_QUIT message, but this isn’t a documented
behaviour.
Is there a way to just close the window, or at worse hide the window?

Thanks in advance,

Dominique Louis
http://www.delph-jedi.org/Jedi:TEAM_SDL_HOME := home of JEDI-SDL, the
Object Pascal bindings for SDL;

SDL_Quit() quits just SDL. Your application can continue to run
afterwards. Or at least that’s the behavior on Linux; and although I
haven’t tested it explicitely, I haven’t encountered any behavior that
contradicts such assumption on Windows.

-MarkOn Tue, 11 Dec 2001, Dominique Louis wrote:

Hi All,
When calling SDL_Quit or SDL_QuitSubSystem, SDL not only kills the
window that it spawn, but also kills the application too. So it would
seem that there is a wild WM_QUIT message, but this isn’t a documented
behaviour.
Is there a way to just close the window, or at worse hide the window?

Thanks in advance,

Dominique Louis
http://www.delph-jedi.org/Jedi:TEAM_SDL_HOME := home of JEDI-SDL, the
Object Pascal bindings for SDL;


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Mark K. Kim
http://www.cbreak.org/mark/
PGP key available upon request.

When calling SDL_Quit or SDL_QuitSubSystem, SDL not only kills the
window that it spawn, but also kills the application too. So it would
seem that there is a wild WM_QUIT message, but this isn’t a documented
behaviour.
Is there a way to just close the window, or at worse hide the window?

SDL_Quit() shouldn’t (to my knowledge) post an event to the queue, and you
shouldn’t be checking the event queue after calling SDL_Quit() anyhow.

“SDL_Quit” is probably better pronounced “SDL_Deinitialize”.

–ryan.

Thanks to everyone that replied.
Let me set the scenario. I have ported the SDLTest example to
Delphi/Kylix, so basically given the demo a GUI front end. There are 2
buttons on the dialog. One to start SDL and do the fade in, fade out
palette test. The second button simply calls SDL_Quit, Nothing else.
There is also a checkbox option to restrict the rendering to a
particular area of the dialog.
If I check the checkbox it sets the appropriate SDL_WINDOWID environment
variable and everything works fine. When the Stop SDL button is pressed
it does not close the application. If I decide not to restrict the
rendering to within the dialog, SDL correctly create a new window for it
to render to, but when the demo finishs and I press the Stop SDL Button,
the whole application shuts down.

Does anyone have any ideas as to why this may be happening?

I have only tested this on Windows.
I will see if it does the same thing under Linux, latter today.

Thanks,

Dominique Louis
http://www.delph-jedi.org/Jedi:TEAM_SDL_HOME := home of JEDI-SDL, the
Object Pascal bindings for SDL;

Dominique Louis wrote:> Hi All,

When calling SDL_Quit or SDL_QuitSubSystem, SDL not only kills the
window that it spawn, but also kills the application too. So it would
seem that there is a wild WM_QUIT message, but this isn’t a documented
behaviour.
Is there a way to just close the window, or at worse hide the window?

Thanks in advance,

Dominique Louis
http://www.delph-jedi.org/Jedi:TEAM_SDL_HOME := home of JEDI-SDL, the
Object Pascal bindings for SDL;


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl