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 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)
|
||||||
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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue