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
This commit is contained in:
parent
51c2d1714d
commit
80a88bc0d3
1 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue