aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2014-12-27 23:52:18 +0100
committerWillem Jan Palenstijn2014-12-27 23:52:18 +0100
commitc823a6e825a6474c75f1ddecfcb67a602393fae6 (patch)
tree97a20cc10514f323df0609e2c5cb3d4d0ab970bb
parent4931aee954704a7ee984ce8cee85bdbec3ddb640 (diff)
downloadscummvm-rg350-c823a6e825a6474c75f1ddecfcb67a602393fae6.tar.gz
scummvm-rg350-c823a6e825a6474c75f1ddecfcb67a602393fae6.tar.bz2
scummvm-rg350-c823a6e825a6474c75f1ddecfcb67a602393fae6.zip
ZVISION: Fix cmdRawToWav on BE systems
-rw-r--r--engines/zvision/core/console.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/zvision/core/console.cpp b/engines/zvision/core/console.cpp
index c7592c8d9d..b5e542d777 100644
--- a/engines/zvision/core/console.cpp
+++ b/engines/zvision/core/console.cpp
@@ -138,6 +138,10 @@ bool Console::cmdRawToWav(int argc, const char **argv) {
output.writeUint32LE(file.size() * 2);
int16 *buffer = new int16[file.size()];
audioStream->readBuffer(buffer, file.size());
+#ifndef SCUMM_LITTLE_ENDIAN
+ for (int i = 0; i < file.size(); ++i)
+ buffer[i] = TO_LE_16(buffer[i]);
+#endif
output.write(buffer, file.size() * 2);
delete[] buffer;