aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorChristoph Mallon2011-08-07 14:35:01 +0200
committerChristoph Mallon2011-08-07 15:19:09 +0200
commite35b4f20c1041b13361aa2ebc4e758873bb1cee3 (patch)
treeb07e8cc3f161fb91f7220d94f24f264cfd13b788 /engines/kyra
parentb4b6ce0954f4a636be0b7b88197376b3917af31f (diff)
downloadscummvm-rg350-e35b4f20c1041b13361aa2ebc4e758873bb1cee3.tar.gz
scummvm-rg350-e35b4f20c1041b13361aa2ebc4e758873bb1cee3.tar.bz2
scummvm-rg350-e35b4f20c1041b13361aa2ebc4e758873bb1cee3.zip
GRAPHICS: Simplify the interface of Graphics::loadThumbnail().
Now it returns the Surface, so the caller does not need to create one and pass it.
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/saveload.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp
index f41cf0c6e3..42c5d3e8a8 100644
--- a/engines/kyra/saveload.cpp
+++ b/engines/kyra/saveload.cpp
@@ -113,12 +113,7 @@ KyraEngine_v1::kReadSaveHeaderError KyraEngine_v1::readSaveHeader(Common::Seekab
if (header.version >= 14) {
if (loadThumbnail) {
- header.thumbnail = new Graphics::Surface();
- assert(header.thumbnail);
- if (!Graphics::loadThumbnail(*in, *header.thumbnail)) {
- delete header.thumbnail;
- header.thumbnail = 0;
- }
+ header.thumbnail = Graphics::loadThumbnail(*in);
} else {
Graphics::skipThumbnail(*in);
}