aboutsummaryrefslogtreecommitdiff
path: root/x11.cpp
diff options
context:
space:
mode:
authorLionel Ulmer2002-04-20 18:13:36 +0000
committerLionel Ulmer2002-04-20 18:13:36 +0000
commitf6501ded28d2c55c3f5cd266a87f25a99c182f0c (patch)
treee096b0c6a959b1dd6583a7ab806f44db46f9633e /x11.cpp
parent487a84d9a675451d579058cfec35bafe0ced3edf (diff)
downloadscummvm-rg350-f6501ded28d2c55c3f5cd266a87f25a99c182f0c.tar.gz
scummvm-rg350-f6501ded28d2c55c3f5cd266a87f25a99c182f0c.tar.bz2
scummvm-rg350-f6501ded28d2c55c3f5cd266a87f25a99c182f0c.zip
Was bitten *again* by the same stupid threading bug :-)
svn-id: r4027
Diffstat (limited to 'x11.cpp')
-rw-r--r--x11.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/x11.cpp b/x11.cpp
index bb186a1eda..0da48c4ab5 100644
--- a/x11.cpp
+++ b/x11.cpp
@@ -226,6 +226,7 @@ static void *sound_and_music_thread(void *params)
exit(-1);
}
+ sched_yield();
while (1) {
unsigned short *buf = (unsigned short *)sound_buffer;
int size, written;
@@ -374,7 +375,7 @@ void OSystem_X11::init_size(uint w, uint h) {
}
bool OSystem_X11::set_sound_proc(void *param, SoundProc *proc, byte format) {
- THREAD_PARAM thread_param;
+ static THREAD_PARAM thread_param;
/* And finally start the music thread */
thread_param.param = param;