Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed bug #916

Shutting down the video shuts down the event loop, so don't do that after starting the event loop. :)
  • Loading branch information
slouken committed Jan 24, 2010
1 parent 6149a1b commit 65217086b64bdae2d520c8bcdda12444990eced6
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/video/SDL_video.c
@@ -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;

0 comments on commit 6521708

Please sign in to comment.