summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/FTServer.cpp
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2010-06-01 20:12:59 +0000
committerWim Vriend <facetracknoir@gmail.com>2010-06-01 20:12:59 +0000
commit49d80a3e2497bdc75fa5d8b24cea7a02e4e2f96e (patch)
tree333a53c86351012d90689b3e3a6883a003a3c4a3 /FaceTrackNoIR/FTServer.cpp
parent2625fe5af6bf71a627dcf10ff813574f8a61f994 (diff)
Added Start/stop/reset, started with anti-jitter-campaign
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@4 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/FTServer.cpp')
-rw-r--r--FaceTrackNoIR/FTServer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/FaceTrackNoIR/FTServer.cpp b/FaceTrackNoIR/FTServer.cpp
index 854b091a..578317a1 100644
--- a/FaceTrackNoIR/FTServer.cpp
+++ b/FaceTrackNoIR/FTServer.cpp
@@ -40,6 +40,7 @@
//
/*
Modifications (last one on top):
+ 20100601 - WVR: Added Mutex-bit in run(). Thought it wasn't so important (still do...).
20100523 - WVR: Implemented the Freetrack-protocol just like Freetrack does. Earlier
FaceTrackNoIR only worked with an adapted DLL, with a putdata function.
Now it works direcly in shared memory!
@@ -99,7 +100,7 @@ void FTServer::run() {
return;
}
- if (pMemData != NULL) {
+ if ( (pMemData != NULL) && (WaitForSingleObject(hFTMutex, 100) == WAIT_OBJECT_0) ) {
//
// Copy the Raw measurements directly to the client.
@@ -135,6 +136,7 @@ void FTServer::run() {
qDebug() << "FTServer says: pMemData.DataID =" << pMemData->data.DataID;
qDebug() << "FTServer says: ProgramName =" << pMemData->ProgramName;
+ ReleaseMutex(hFTMutex);
}
// just for lower cpu load