mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
(svn r18390) -Fix (r17776): [SDL] Reinstate pointer update on 'idle' loop.
This commit is contained in:
parent
f49c1dcd78
commit
57bcb5f903
@ -593,19 +593,23 @@ void VideoDriver_SDL::MainLoop()
|
||||
CheckPaletteAnim();
|
||||
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 {
|
||||
/* Release the thread while sleeping */
|
||||
if (_draw_threaded) _draw_mutex->EndCritical();
|
||||
CSleep(1);
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user