From 18a10a77442a717fc63422287f1f6bd0b561b03c Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Thu, 13 Dec 2012 21:35:08 +0100 Subject: WINTERMUTE: Scale thumbs to kThumbNailWidth/kThumbNailHeight --- engines/wintermute/base/base_persistence_manager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp index 4cb67b87e1..501b7f6739 100644 --- a/engines/wintermute/base/base_persistence_manager.cpp +++ b/engines/wintermute/base/base_persistence_manager.cpp @@ -36,8 +36,10 @@ #include "engines/wintermute/math/vector2.h" #include "engines/wintermute/base/gfx/base_image.h" #include "engines/wintermute/base/sound/base_sound.h" +#include "engines/wintermute/graphics/transparent_surface.h" #include "engines/wintermute/wintermute.h" #include "graphics/decoders/bmp.h" +#include "graphics/scaler.h" #include "common/memstream.h" #include "common/str.h" #include "common/system.h" @@ -150,7 +152,11 @@ void BasePersistenceManager::getSaveStateDesc(int slot, SaveStateDescriptor &des if (bmpDecoder.loadStream(thumbStream)) { Graphics::Surface *surf = new Graphics::Surface; surf = bmpDecoder.getSurface()->convertTo(g_system->getOverlayFormat()); - desc.setThumbnail(surf); + TransparentSurface *scaleableSurface = new TransparentSurface(*surf, false); + Graphics::Surface *scaled = scaleableSurface->scale(kThumbnailWidth, kThumbnailHeight2); + desc.setThumbnail(scaled); + delete scaleableSurface; + delete surf; } } -- cgit v1.2.3