diff options
author | Paul Gilbert | 2017-09-19 19:27:23 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-09-19 19:27:23 -0400 |
commit | ba45fb2d60824a61e15830de1c37bca35411f786 (patch) | |
tree | 810ce3f15a938ff1de8cc23e3b5e4656c6955521 | |
parent | af99606db8417ae69814907e16b3a89fbb1a1073 (diff) | |
download | scummvm-rg350-ba45fb2d60824a61e15830de1c37bca35411f786.tar.gz scummvm-rg350-ba45fb2d60824a61e15830de1c37bca35411f786.tar.bz2 scummvm-rg350-ba45fb2d60824a61e15830de1c37bca35411f786.zip |
TITANIC: Remove redundant surface ccreation from DirectDrawManager
-rw-r--r-- | engines/titanic/support/direct_draw.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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) { |