From 2e5c3e1042d5bd0463fdd591c9a30468f341d2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Sat, 31 Oct 2009 20:41:19 +0000 Subject: try syslock/unlock to avoid threading problems svn path=/trunk/externals/hardware/wiimote/; revision=12707 --- wiimote.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wiimote.c b/wiimote.c index 9317acd..a0c8b94 100644 --- a/wiimote.c +++ b/wiimote.c @@ -660,7 +660,9 @@ static void wiimote_queue(t_wiimote*x, union cwiid_mesg*mesg, double timestamp) } /* reset the clock */ + sys_lock(); clock_delay(g_clock, 0); + sys_unlock(); } #else static void wiimote_dequeue(void*nada) @@ -734,7 +736,6 @@ static void cwiid_error_callback(cwiid_wiimote_t *wiimote, const char*err, va_li pd_error(x, "wiimote: unknown error"); } } - } // The CWiid library invokes a callback function whenever events are -- cgit v1.2.1