diff options
author | S. Davilla <davilla@4pi.com> | 2011-04-30 21:30:19 -0400 |
---|---|---|
committer | S. Davilla <davilla@4pi.com> | 2011-04-30 21:30:19 -0400 |
commit | 834758b05912e3ec2f9fede90cf5b226504d1b7d (patch) | |
tree | 9a0785c3c191ef25442b535bda20c7d9a3151663 | |
parent | f5e63e6a4c453e2a374a9b233e4108dcd15f88b7 (diff) |
fixed, lzo_uint size depends on arch
-rw-r--r-- | tools/TexturePacker/XBMCTex.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/TexturePacker/XBMCTex.cpp b/tools/TexturePacker/XBMCTex.cpp index 4cf3aeea77..1777f6cab8 100644 --- a/tools/TexturePacker/XBMCTex.cpp +++ b/tools/TexturePacker/XBMCTex.cpp @@ -187,8 +187,9 @@ void CreateSkeletonHeader(CXBTF& xbtf, std::string fullPath) CXBTFFrame appendContent(CXBTFWriter &writer, int width, int height, unsigned char *data, unsigned int size, unsigned int format, unsigned int flags) { CXBTFFrame frame; - unsigned int packedSize = size; #ifdef USE_LZO_PACKING + lzo_uint packedSize = size; + if ((flags & FLAGS_USE_LZO) == FLAGS_USE_LZO) { // grab a temporary buffer for unpacking into @@ -196,7 +197,7 @@ CXBTFFrame appendContent(CXBTFWriter &writer, int width, int height, unsigned ch unsigned char *working = new unsigned char[LZO1X_999_MEM_COMPRESS]; if (packed && working) { - if (lzo1x_999_compress(data, size, packed, (lzo_uint*)&packedSize, working) != LZO_E_OK || packedSize > size) + if (lzo1x_999_compress(data, size, packed, &packedSize, working) != LZO_E_OK || packedSize > size) { // compression failed, or compressed size is bigger than uncompressed, so store as uncompressed packedSize = size; @@ -213,6 +214,8 @@ CXBTFFrame appendContent(CXBTFWriter &writer, int width, int height, unsigned ch } } else +#else + unsigned int packedSize = size; #endif { writer.AppendContent(data, size); |