@@ -520,13 +520,13 @@ void VideoDriver_SDL::MainLoop()
for (;;) {
uint32 prev_cur_ticks = cur_ticks; // to check for wrapping
InteractiveRandom(); // randomness
while (PollEvent() == -1) {}
if (_exit_game) return;
if (_exit_game) break;
mod = SDL_CALL SDL_GetModState();
keys = SDL_CALL SDL_GetKeyState(&numkeys);
#if defined(_DEBUG)
if (_shift_pressed)
#else
@@ -589,12 +589,14 @@ void VideoDriver_SDL::MainLoop()
if (_draw_threaded) _draw_mutex->BeginCritical();
}
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();
delete _draw_mutex;
delete _draw_thread;