diff options
author | Paul Gilbert | 2016-03-21 22:05:08 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-03-21 22:05:08 -0400 |
commit | 6a118677ed76a9a4dc1f4eb38c19b99e1b3a2e60 (patch) | |
tree | ec22ee47e9a164935eb6900806dc207573323a50 | |
parent | 1e6a32001088d790be2b1f909f90d55bb688ad6d (diff) | |
download | scummvm-rg350-6a118677ed76a9a4dc1f4eb38c19b99e1b3a2e60.tar.gz scummvm-rg350-6a118677ed76a9a4dc1f4eb38c19b99e1b3a2e60.tar.bz2 scummvm-rg350-6a118677ed76a9a4dc1f4eb38c19b99e1b3a2e60.zip |
TITANIC: Fix initialization of screen manager surfaces
-rw-r--r-- | engines/titanic/direct_draw.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/screen_manager.cpp | 5 | ||||
-rw-r--r-- | engines/titanic/video_surface.cpp | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/engines/titanic/direct_draw.cpp b/engines/titanic/direct_draw.cpp index 79ca968f8d..1c19911068 100644 --- a/engines/titanic/direct_draw.cpp +++ b/engines/titanic/direct_draw.cpp @@ -93,7 +93,7 @@ void DirectDrawManager::initFullScreen() { _directDraw._bpp, 0); _mainSurface = new DirectDrawSurface(); - _mainSurface->create(_directDraw._width, _directDraw._height); + _mainSurface->create(g_vm->_screen); _backSurfaces[0] = new DirectDrawSurface(); _backSurfaces[0]->create(_directDraw._width, _directDraw._height); } diff --git a/engines/titanic/screen_manager.cpp b/engines/titanic/screen_manager.cpp index 4f9fbc2215..4d37b4578b 100644 --- a/engines/titanic/screen_manager.cpp +++ b/engines/titanic/screen_manager.cpp @@ -90,9 +90,10 @@ void OSScreenManager::setMode(int width, int height, int bpp, uint numBackSurfac _frontRenderSurface = new OSVideoSurface(this, nullptr); _frontRenderSurface->setSurface(this, _directDrawManager._mainSurface); + _backSurfaces.resize(numBackSurfaces); for (uint idx = 0; idx < numBackSurfaces; ++idx) { - OSVideoSurface videoSurface(this, nullptr); - videoSurface.setSurface(this, _directDrawManager._backSurfaces[idx]); + _backSurfaces[idx]._surface = new OSVideoSurface(this, nullptr); + _backSurfaces[idx]._surface->setSurface(this, _directDrawManager._backSurfaces[idx]); } // Load fonts diff --git a/engines/titanic/video_surface.cpp b/engines/titanic/video_surface.cpp index ab5bf7d39c..e833e1c1c7 100644 --- a/engines/titanic/video_surface.cpp +++ b/engines/titanic/video_surface.cpp @@ -124,8 +124,9 @@ void CVideoSurface::blitRect1(const Rect &srcRect, const Rect &destRect, CVideoS lock(); // TODO: Do it like the original does it - this->_rawSurface->blitFrom(*src->_rawSurface, srcRect, Point(destRect.left, destRect.top)); - +// this->_rawSurface->blitFrom(*src->_rawSurface, srcRect, Point(destRect.left, destRect.top)); + this->_rawSurface->blitFrom(*src->_rawSurface); + src->unlock(); unlock(); } |