Changeset - r13431:72f7a43f410b
[Not reviewed]
master
0 1 0
smatz - 15 years ago 2009-11-02 13:36:17
smatz@openttd.org
(svn r17950) -Fix (r17776): _draw_mutex was never destroyed, _draw_thread was never joined
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/video/sdl_v.cpp
Show inline comments
 
@@ -523,7 +523,7 @@ void VideoDriver_SDL::MainLoop()
 
		InteractiveRandom(); // randomness
 

	
 
		while (PollEvent() == -1) {}
 
		if (_exit_game) return;
 
		if (_exit_game) break;
 

	
 
		mod = SDL_CALL SDL_GetModState();
 
		keys = SDL_CALL SDL_GetKeyState(&numkeys);
 
@@ -592,6 +592,8 @@ void VideoDriver_SDL::MainLoop()
 

	
 
	if (_draw_threaded) {
 
		_draw_continue = false;
 
		/* Sending signal if there is no thread blocked
 
		 * is very valid and results in noop */
 
		_draw_mutex->SendSignal();
 
		_draw_mutex->EndCritical();
 
		_draw_thread->Join();
0 comments (0 inline, 0 general)