[Scummvm-git-logs] scummvm master -> ba45fb2d60824a61e15830de1c37bca35411f786

dreammaster dreammaster at scummvm.org
Wed Sep 20 01:27:31 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ba45fb2d60 TITANIC: Remove redundant surface ccreation from DirectDrawManager


Commit: ba45fb2d60824a61e15830de1c37bca35411f786
    https://github.com/scummvm/scummvm/commit/ba45fb2d60824a61e15830de1c37bca35411f786
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-09-19T19:27:23-04:00

Commit Message:
TITANIC: Remove redundant surface ccreation from DirectDrawManager

Changed paths:
    engines/titanic/support/direct_draw.cpp


diff --git a/engines/titanic/support/direct_draw.cpp b/engines/titanic/support/direct_draw.cpp
index 71a90ad..9559480 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) {





More information about the Scummvm-git-logs mailing list