Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug #916
Browse files Browse the repository at this point in the history
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 6521708
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/video/SDL_video.c
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 6521708

Please sign in to comment.