aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-10-31 20:41:19 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-10-31 20:41:19 +0000
commit2e5c3e1042d5bd0463fdd591c9a30468f341d2f9 (patch)
treea0112c48885b62ed048584d8bb445c9da663870d
parent82068e5edf2a0ede8ba19a480d749dff73374614 (diff)
try syslock/unlock to avoid threading problems
svn path=/trunk/externals/hardware/wiimote/; revision=12707
-rw-r--r--wiimote.c3
1 files changed, 2 insertions, 1 deletions
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