1
0
Fork 0

(svn r18390) -Fix (r17776): [SDL] Reinstate pointer update on 'idle' loop.

release/1.0
peter1138 2009-12-03 08:24:39 +00:00
parent 5c1fdfdd03
commit 3addf58f30
1 changed files with 12 additions and 8 deletions

View File

@ -593,19 +593,23 @@ void VideoDriver_SDL::MainLoop()
CheckPaletteAnim(); CheckPaletteAnim();
pal_tick = 1; pal_tick = 1;
} }
/* End of the critical part. */
if (_draw_threaded && !IsGeneratingWorld()) {
_draw_mutex->SendSignal();
} else {
/* Oh, we didn't have threads, then just draw unthreaded */
DrawSurfaceToScreen();
}
} else { } else {
/* Release the thread while sleeping */ /* Release the thread while sleeping */
if (_draw_threaded) _draw_mutex->EndCritical(); if (_draw_threaded) _draw_mutex->EndCritical();
CSleep(1); CSleep(1);
if (_draw_threaded) _draw_mutex->BeginCritical(); if (_draw_threaded) _draw_mutex->BeginCritical();
_screen.dst_ptr = _sdl_screen->pixels;
NetworkDrawChatMessage();
DrawMouseCursor();
}
/* End of the critical part. */
if (_draw_threaded && !IsGeneratingWorld()) {
_draw_mutex->SendSignal();
} else {
/* Oh, we didn't have threads, then just draw unthreaded */
DrawSurfaceToScreen();
} }
} }