Update openttd to 1.7.0-RC1

--HG--
branch : openttd
This commit is contained in:
Pavel Stupnikov
2017-03-12 16:41:12 +03:00
parent ecdb1590ab
commit 3433ae02f4
262 changed files with 5052 additions and 3913 deletions
+11 -17
View File
@@ -1,4 +1,4 @@
/* $Id: sdl_v.cpp 27167 2015-02-22 23:06:45Z frosch $ */
/* $Id: sdl_v.cpp 27775 2017-03-11 13:05:54Z frosch $ */
/*
* This file is part of OpenTTD.
@@ -404,19 +404,6 @@ bool VideoDriver_SDL::CreateMainSurface(uint w, uint h)
blitter->PostResize();
InitPalette();
switch (blitter->UsePaletteAnimation()) {
case Blitter::PALETTE_ANIMATION_NONE:
case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
UpdatePalette();
break;
case Blitter::PALETTE_ANIMATION_BLITTER:
if (VideoDriver::GetInstance() != NULL) blitter->PaletteAnimate(_local_palette);
break;
default:
NOT_REACHED();
}
seprintf(caption, lastof(caption), "OpenTTD %s", _openttd_revision);
SDL_CALL SDL_WM_SetCaption(caption, caption);
@@ -687,7 +674,7 @@ void VideoDriver_SDL::MainLoop()
_draw_mutex->BeginCritical();
_draw_continue = true;
_draw_threaded = ThreadObject::New(&DrawSurfaceToScreenThread, NULL, &_draw_thread);
_draw_threaded = ThreadObject::New(&DrawSurfaceToScreenThread, NULL, &_draw_thread, "ottd:draw-sdl");
/* Free the mutex if we won't be able to use it. */
if (!_draw_threaded) {
@@ -830,11 +817,18 @@ bool VideoDriver_SDL::ToggleFullscreen(bool fullscreen)
}
bool VideoDriver_SDL::AfterBlitterChange()
{
return CreateMainSurface(_screen.width, _screen.height);
}
void VideoDriver_SDL::AcquireBlitterLock()
{
if (_draw_mutex != NULL) _draw_mutex->BeginCritical(true);
bool ret = CreateMainSurface(_screen.width, _screen.height);
}
void VideoDriver_SDL::ReleaseBlitterLock()
{
if (_draw_mutex != NULL) _draw_mutex->EndCritical(true);
return ret;
}
#endif /* WITH_SDL */