Quiting SDL window without quiting application?

How?

Just close down SDL, or even just the screen. (The latter is nice if you
want sound to keep running while switching modes. I’m doing this in Kobo
Deluxe, and it actually works without clicking or anything on some
machines. :slight_smile:

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Thursday 28 March 2002 20:14, Orhun Birsoy wrote:

How?

Sorry for my ignorance but , I have several dialogs (in fact SDL window is
created from one of the dialogs). When I call SDL_Quit(). After the function
that called SDL_Quit() returns, application also quits. This Windows and MFC
by the way. I am also quite new to SDL.

Thanks!> ----- Original Message -----

From: david.olofson@reologica.se (David Olofson)
To:
Sent: Thursday, March 28, 2002 12:38
Subject: Re: [SDL] Quiting SDL window without quiting application?

On Thursday 28 March 2002 20:14, Orhun Birsoy wrote:

How?

Just close down SDL, or even just the screen. (The latter is nice if you
want sound to keep running while switching modes. I’m doing this in Kobo
Deluxe, and it actually works without clicking or anything on some
machines. :slight_smile:

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -’


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

Sorry for my ignorance but , I have several dialogs (in fact SDL window is
created from one of the dialogs). When I call SDL_Quit(). After the function
that called SDL_Quit() returns, application also quits. This Windows and MFC
by the way. I am also quite new to SDL.

What happens when you do SDL_QuitSubSystem(SDL_INIT_VIDEO)?

–ryan.

Same as SDL_Quit. I only pass SDL_INIT_VIDEO to SDL_Init for testing
purposes.> ----- Original Message -----

From: icculus@icculus.org (Ryan C. Gordon)
To:
Sent: Thursday, March 28, 2002 14:49
Subject: Re: [SDL] Quiting SDL window without quiting application?

Sorry for my ignorance but , I have several dialogs (in fact SDL window
is

created from one of the dialogs). When I call SDL_Quit(). After the
function

that called SDL_Quit() returns, application also quits. This Windows and
MFC

by the way. I am also quite new to SDL.

What happens when you do SDL_QuitSubSystem(SDL_INIT_VIDEO)?

–ryan.


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

I found a nasty solution.

SDL_Thread * SDLThread = SDL_CreateThread(DispPolyGL_ThreadFunc, NULL);
SDL_WaitThread(SDLThread, NULL);

DispPolyGL_ThreadFunc contains all the necessary init, draw and quit
functions for SDL.

Now my application does not quit. Just the thread I created. Is this a
possible solution?> ----- Original Message -----

From: icculus@icculus.org (Ryan C. Gordon)
To:
Sent: Thursday, March 28, 2002 14:49
Subject: Re: [SDL] Quiting SDL window without quiting application?

Sorry for my ignorance but , I have several dialogs (in fact SDL window
is

created from one of the dialogs). When I call SDL_Quit(). After the
function

that called SDL_Quit() returns, application also quits. This Windows and
MFC

by the way. I am also quite new to SDL.

What happens when you do SDL_QuitSubSystem(SDL_INIT_VIDEO)?

–ryan.


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

Same as SDL_Quit. I only pass SDL_INIT_VIDEO to SDL_Init for testing
purposes.

Are you saying SDL_QuitSubSystem() gives you same results, or you are
assuming it will give you the same results because you only initialized
the video subsystem?

If it’s the latter, please humor me.

–ryan.

I tried it and the application quited! And I thought that the reason might
be because I only initialize the video.!> ----- Original Message -----

From: icculus@icculus.org (Ryan C. Gordon)
To:
Sent: Thursday, March 28, 2002 15:31
Subject: Re: [SDL] Quiting SDL window without quiting application?

Same as SDL_Quit. I only pass SDL_INIT_VIDEO to SDL_Init for testing
purposes.

Are you saying SDL_QuitSubSystem() gives you same results, or you are
assuming it will give you the same results because you only initialized
the video subsystem?

If it’s the latter, please humor me.

–ryan.


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

What I’m thinking this might be is some kind of strange MFC window
destructor behavior. With no window, maybe it assumes the program can’t do
anything useful and so it terminates. When it comes to MFC, it’s a whole
new philosophy after all. Is the OpenGL window acting as the frame window?
If so, it should probably be a view window instead. If you don’t really
need MFC, I’d recommend just making a Win32 application instead. That’s
more what SDL is designed for.

-Jason> ----- Original Message -----

From: obirsoy@marketweb.net.tr (Orhun Birsoy)
To:
Sent: Thursday, March 28, 2002 5:04 PM
Subject: Re: [SDL] Quiting SDL window without quiting application?

I found a nasty solution.

SDL_Thread * SDLThread = SDL_CreateThread(DispPolyGL_ThreadFunc, NULL);
SDL_WaitThread(SDLThread, NULL);

DispPolyGL_ThreadFunc contains all the necessary init, draw and quit
functions for SDL.

Now my application does not quit. Just the thread I created. Is this a
possible solution?

----- Original Message -----
From: “Ryan C. Gordon”
To:
Sent: Thursday, March 28, 2002 14:49
Subject: Re: [SDL] Quiting SDL window without quiting application?

Sorry for my ignorance but , I have several dialogs (in fact SDL
window
is

created from one of the dialogs). When I call SDL_Quit(). After the
function

that called SDL_Quit() returns, application also quits. This Windows
and
MFC

by the way. I am also quite new to SDL.

What happens when you do SDL_QuitSubSystem(SDL_INIT_VIDEO)?

–ryan.


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