Shutting down the video shuts down the event loop, so don't do that after starting the event loop. :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404449
This commit is contained in:
Sam Lantinga 2010-01-24 19:47:17 +00:00
parent 51c2d1714d
commit 80a88bc0d3

View file

@ -163,6 +163,11 @@ SDL_VideoInit(const char *driver_name, Uint32 flags)
int index;
int i;
/* Check to make sure we don't overwrite '_this' */
if (_this != NULL) {
SDL_VideoQuit();
}
/* Toggle the event thread flags, based on OS requirements */
#if defined(MUST_THREAD_EVENTS)
flags |= SDL_INIT_EVENTTHREAD;
@ -177,10 +182,7 @@ SDL_VideoInit(const char *driver_name, Uint32 flags)
if (SDL_StartEventLoop(flags) < 0) {
return -1;
}
/* Check to make sure we don't overwrite '_this' */
if (_this != NULL) {
SDL_VideoQuit();
}
/* Select the proper video driver */
index = 0;
video = NULL;