[SDL] Using SDL from within an Windows MFC application
stephena at roadrunner.nf.net
Sat Nov 1 07:59:01 PST 2003
On Saturday 01 November 2003 12:04 pm, Stephen Anthony wrote:
> My question is, can I use SDL to do this backend part instead? I
> guess my real question is that can the SDL subsystems be opened and
> closed multiple times within the same program (when a new game is
> launched and finished)? And if using SDL within a Windows
> application, does it have to be initialized as soon as the actual
> Windows application starts? Or can I do it whenever I want (which
> would sometimes be not at all)? If this is possible, then I assume
> that the while SDL is active, it will take over all event-handling.
> But when SDL exits, will event handling return to the MFC
One other thing I forgot to mention about this part. Of course
SDL_SetVideoMode() can be called multiple times per program invocation,
since I already do it in Linux when I resize the SDL screen.
Similarly, I assume that the sound subsystem can be opened and closed
So my more specific questions are:
1) Can these subsystems be opened and closed multiple times per program
invocation *in SDL under Windows*?
2) Can SDL_Init() be called multiple times per program invocation in SDL
under Windows? And what will happen once SDL_Quit() is called within
an application? Does the whole application quit, or does the current
SDL window close and processing can continue? If processing can
continue, will the underlying Windows application still get events?
More information about the SDL