mirror of https://github.com/OpenTTD/OpenTTD
(svn r18390) -Fix (r17776): [SDL] Reinstate pointer update on 'idle' loop.
parent
5c1fdfdd03
commit
3addf58f30
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue