aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/psp
diff options
context:
space:
mode:
authorMax Horn2008-09-16 11:42:21 +0000
committerMax Horn2008-09-16 11:42:21 +0000
commit706fb37061d96fdf5c8d1a202d6dcc9a799c8d2b (patch)
tree2951410fcbcd06b5e33f7f997ee8a739ef974505 /backends/platform/psp
parent3bffca569f6d4677ca5502dbe3a7f8ef33f369be (diff)
downloadscummvm-rg350-706fb37061d96fdf5c8d1a202d6dcc9a799c8d2b.tar.gz
scummvm-rg350-706fb37061d96fdf5c8d1a202d6dcc9a799c8d2b.tar.bz2
scummvm-rg350-706fb37061d96fdf5c8d1a202d6dcc9a799c8d2b.zip
Modified uncompress in common/zlib.h to return a bool, so that we don't have to #include the real zlib.h; fixed PSP backend to not run uncompress inside an assert (which would cause it to not be invoked when turning off asserts)
svn-id: r34576
Diffstat (limited to 'backends/platform/psp')
-rw-r--r--backends/platform/psp/osys_psp_gu.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/backends/platform/psp/osys_psp_gu.cpp b/backends/platform/psp/osys_psp_gu.cpp
index 7e36fe6db0..7051556e6b 100644
--- a/backends/platform/psp/osys_psp_gu.cpp
+++ b/backends/platform/psp/osys_psp_gu.cpp
@@ -94,19 +94,24 @@ OSystem_PSP_GU::OSystem_PSP_GU() {
//decompress keyboard data
uLongf kbdSize = KBD_DATA_SIZE;
keyboard_letters = (unsigned char *)memalign(16, KBD_DATA_SIZE);
- assert(Z_OK == uncompress((Bytef *)keyboard_letters, &kbdSize, (const Bytef *)keyboard_letters_compressed, size_keyboard_letters_compressed));
-
+ assert(Z_OK ==
+ if (!uncompress((Bytef *)keyboard_letters, &kbdSize, (const Bytef *)keyboard_letters_compressed, size_keyboard_letters_compressed))
+ error("OSystem_PSP_GU: uncompressing keyboard_letters failed");
+
kbdSize = KBD_DATA_SIZE;
keyboard_letters_shift = (unsigned char *)memalign(16, KBD_DATA_SIZE);
- assert(Z_OK == uncompress((Bytef *)keyboard_letters_shift, &kbdSize, (const Bytef *)keyboard_letters_shift_compressed, size_keyboard_letters_shift_compressed));
+ if (!uncompress((Bytef *)keyboard_letters_shift, &kbdSize, (const Bytef *)keyboard_letters_shift_compressed, size_keyboard_letters_shift_compressed))
+ error("OSystem_PSP_GU: uncompressing keyboard_letters_shift failed");
kbdSize = KBD_DATA_SIZE;
keyboard_symbols = (unsigned char *)memalign(16, KBD_DATA_SIZE);
- assert(Z_OK == uncompress((Bytef *)keyboard_symbols, &kbdSize, (const Bytef *)keyboard_symbols_compressed, size_keyboard_symbols_compressed));
+ if (!uncompress((Bytef *)keyboard_symbols, &kbdSize, (const Bytef *)keyboard_symbols_compressed, size_keyboard_symbols_compressed))
+ error("OSystem_PSP_GU: uncompressing keyboard_symbols failed");
kbdSize = KBD_DATA_SIZE;
keyboard_symbols_shift = (unsigned char *)memalign(16, KBD_DATA_SIZE);
- assert(Z_OK == uncompress((Bytef *)keyboard_symbols_shift, &kbdSize, (const Bytef *)keyboard_symbols_shift_compressed, size_keyboard_symbols_shift_compressed));
+ if (!uncompress((Bytef *)keyboard_symbols_shift, &kbdSize, (const Bytef *)keyboard_symbols_shift_compressed, size_keyboard_symbols_shift_compressed))
+ error("OSystem_PSP_GU: uncompressing keyboard_symbols_shift failed");
_keyboardVisible = false;
_clut = (unsigned short*)(((unsigned int)clut256)|0x40000000);