aboutsummaryrefslogtreecommitdiff
path: root/x11.cpp
diff options
context:
space:
mode:
authorLionel Ulmer2002-03-06 23:14:16 +0000
committerLionel Ulmer2002-03-06 23:14:16 +0000
commit89d55aca166f62e6c33e97ba5158ff1a670659cb (patch)
treea62013629457d290e9ba7744685af19baffdebcf /x11.cpp
parent5b2e56509d2b49dfe11f53fd435831d4d17761cb (diff)
downloadscummvm-rg350-89d55aca166f62e6c33e97ba5158ff1a670659cb.tar.gz
scummvm-rg350-89d55aca166f62e6c33e97ba5158ff1a670659cb.tar.bz2
scummvm-rg350-89d55aca166f62e6c33e97ba5158ff1a670659cb.zip
Remove too strict error checking that prevented debugging.
svn-id: r3672
Diffstat (limited to 'x11.cpp')
-rw-r--r--x11.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/x11.cpp b/x11.cpp
index 6b498d00ce..dfac96d2fa 100644
--- a/x11.cpp
+++ b/x11.cpp
@@ -45,8 +45,6 @@
#include <fcntl.h>
#include <sys/ioctl.h>
-#undef BUILD_FOR_IPAQ
-
Scumm scumm;
ScummDebugger debugger;
Gui gui;
@@ -147,15 +145,17 @@ static void *sound_and_music_thread(void *params) {
while (1) {
unsigned short *buf = (unsigned short *) sound_buffer;
+ int size, written;
scumm.mixWaves((short *) sound_buffer, FRAG_SIZE >> 2);
/* Now convert to stereo */
for (int i = ((FRAG_SIZE >> 2) - 1); i >= 0; i--) {
buf[2 * i + 1] = buf[2 * i] = buf[i];
}
- if (write(sound_fd, sound_buffer, FRAG_SIZE) != FRAG_SIZE) {
- error("Bad write to the audio device !\n");
- exit(1);
+ size = FRAG_SIZE;
+ while (size > 0) {
+ written = write(sound_fd, sound_buffer, size);
+ size -= written;
}
}