aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/thumbnail.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/scumm/thumbnail.cpp b/scumm/thumbnail.cpp
index 2733939cca..9b82628ba2 100644
--- a/scumm/thumbnail.cpp
+++ b/scumm/thumbnail.cpp
@@ -102,12 +102,20 @@ Graphics::Surface *ScummEngine::loadThumbnail(Common::InSaveFile *file) {
void ScummEngine::saveThumbnail(Common::OutSaveFile *file) {
Graphics::Surface thumb;
+#ifndef PALMOS_68K
if (!createThumbnailFromScreen(&thumb))
+#endif
thumb.create(kThumbnailWidth, kThumbnailHeight2, sizeof(uint16));
ThumbnailHeader header;
header.type = MKID('THMB');
+#ifdef PALMOS_ARM
+ // sizeof(header) is hardcoded here, because the compiler add padding to
+ // have a 4byte aligned struct and there is no easy way to pack it.
+ header.size = 14 + thumb.w*thumb.h*thumb.bytesPerPixel;
+#else
header.size = sizeof(header) + thumb.w*thumb.h*thumb.bytesPerPixel;
+#endif
header.version = THMB_VERSION;
header.width = thumb.w;
header.height = thumb.h;