aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-12-13 21:35:08 +0100
committerEinar Johan Trøan Sømåen2012-12-13 21:35:37 +0100
commit18a10a77442a717fc63422287f1f6bd0b561b03c (patch)
tree117be79a9423607bf45ca238c42ceb000890cb86 /engines
parent2773f5d7afc381205b5e0fcb8b20700007472516 (diff)
downloadscummvm-rg350-18a10a77442a717fc63422287f1f6bd0b561b03c.tar.gz
scummvm-rg350-18a10a77442a717fc63422287f1f6bd0b561b03c.tar.bz2
scummvm-rg350-18a10a77442a717fc63422287f1f6bd0b561b03c.zip
WINTERMUTE: Scale thumbs to kThumbNailWidth/kThumbNailHeight
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/base/base_persistence_manager.cpp8
1 files changed, 7 insertions, 1 deletions
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;
}
}