aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Apers2005-10-08 22:04:52 +0000
committerChris Apers2005-10-08 22:04:52 +0000
commit95ff7fd0bb2cd735071f8431a05a66f8f217cf2e (patch)
tree635f9c4f3947c5c755da20468fbb50b31c92fc50
parent000a3816f8e041135cdfec1e0868a7f5330296da (diff)
downloadscummvm-rg350-95ff7fd0bb2cd735071f8431a05a66f8f217cf2e.tar.gz
scummvm-rg350-95ff7fd0bb2cd735071f8431a05a66f8f217cf2e.tar.bz2
scummvm-rg350-95ff7fd0bb2cd735071f8431a05a66f8f217cf2e.zip
PalmOS: fixed compiler problem
svn-id: r18979
-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;