From 390487aa43e5507d4d0fb4ae57e7cf726a94f4c1 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 17 Mar 2016 18:35:17 -0400 Subject: GRAPHICS: Cleanup of ManagedSurface and Screen classes --- engines/tsage/graphics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/tsage') diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index 8620498c1e..58fa5b8094 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -245,7 +245,7 @@ GfxSurface::GfxSurface(const GfxSurface &s): Graphics::ManagedSurface() { GfxSurface::~GfxSurface() { // Sanity check.. GfxSurface should always be just referencing _rawSurface, // and not directly managing it's own surface - assert(!isManaged()); + assert(disposeAfterUse() == DisposeAfterUse::NO); } void GfxSurface::create(uint16 width, uint16 height) { @@ -287,7 +287,7 @@ void GfxSurface::synchronize(Serializer &s) { if (s.isSaving()) { // Save contents of the surface - if (isManaged()) { + if (disposeAfterUse() == DisposeAfterUse::YES) { s.syncAsSint16LE(this->w); s.syncAsSint16LE(this->h); s.syncBytes((byte *)getPixels(), this->w * this->h); -- cgit v1.2.3