Commit 80a88bc0 authored by Sam Lantinga's avatar Sam Lantinga

Fixed bug #916

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
parent 51c2d171
...@@ -163,6 +163,11 @@ SDL_VideoInit(const char *driver_name, Uint32 flags) ...@@ -163,6 +163,11 @@ SDL_VideoInit(const char *driver_name, Uint32 flags)
int index; int index;
int i; 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 */ /* Toggle the event thread flags, based on OS requirements */
#if defined(MUST_THREAD_EVENTS) #if defined(MUST_THREAD_EVENTS)
flags |= SDL_INIT_EVENTTHREAD; flags |= SDL_INIT_EVENTTHREAD;
...@@ -177,10 +182,7 @@ SDL_VideoInit(const char *driver_name, Uint32 flags) ...@@ -177,10 +182,7 @@ SDL_VideoInit(const char *driver_name, Uint32 flags)
if (SDL_StartEventLoop(flags) < 0) { if (SDL_StartEventLoop(flags) < 0) {
return -1; return -1;
} }
/* Check to make sure we don't overwrite '_this' */
if (_this != NULL) {
SDL_VideoQuit();
}
/* Select the proper video driver */ /* Select the proper video driver */
index = 0; index = 0;
video = NULL; video = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment