[Scummvm-cvs-logs] CVS: scummvm/scumm thumbnail.cpp,1.8,1.9

Chris Apers chrilith at users.sourceforge.net
Sat Oct 8 15:05:34 CEST 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31730

Modified Files:
	thumbnail.cpp 
Log Message:
PalmOS: fixed compiler problem

Index: thumbnail.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/thumbnail.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- thumbnail.cpp	20 Sep 2005 18:16:09 -0000	1.8
+++ thumbnail.cpp	8 Oct 2005 22:04:52 -0000	1.9
@@ -102,12 +102,20 @@
 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;





More information about the Scummvm-git-logs mailing list