From ba45fb2d60824a61e15830de1c37bca35411f786 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 19 Sep 2017 19:27:23 -0400 Subject: TITANIC: Remove redundant surface ccreation from DirectDrawManager --- engines/titanic/support/direct_draw.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/titanic') diff --git a/engines/titanic/support/direct_draw.cpp b/engines/titanic/support/direct_draw.cpp index 71a90ad00d..9559480a3b 100644 --- a/engines/titanic/support/direct_draw.cpp +++ b/engines/titanic/support/direct_draw.cpp @@ -64,6 +64,8 @@ DirectDrawManager::DirectDrawManager(TitanicEngine *vm, bool windowed) { void DirectDrawManager::initVideo(int width, int height, int bpp, int numBackSurfaces) { debugC(DEBUG_BASIC, kDebugGraphics, "Initialising video surfaces"); + assert(numBackSurfaces == 0); + _directDraw._width = width; _directDraw._numBackSurfaces = numBackSurfaces; _directDraw._height = height; @@ -81,10 +83,9 @@ void DirectDrawManager::initFullScreen() { _directDraw.setDisplayMode(_directDraw._width, _directDraw._height, _directDraw._bpp, 0); + // Set up the main surface to point to the screen _mainSurface = new DirectDrawSurface(); _mainSurface->create(g_vm->_screen); - _backSurfaces[0] = new DirectDrawSurface(); - _backSurfaces[0]->create(_directDraw._width, _directDraw._height, 32); } DirectDrawSurface *DirectDrawManager::createSurface(int w, int h, int bpp, int surfaceNum) { -- cgit v1.2.3