summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_wine/ftnoir-wrapper-wine-main.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_protocol_wine/ftnoir-wrapper-wine-main.cxx')
-rw-r--r--ftnoir_protocol_wine/ftnoir-wrapper-wine-main.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/ftnoir_protocol_wine/ftnoir-wrapper-wine-main.cxx b/ftnoir_protocol_wine/ftnoir-wrapper-wine-main.cxx
index 4132062f..9d8914bd 100644
--- a/ftnoir_protocol_wine/ftnoir-wrapper-wine-main.cxx
+++ b/ftnoir_protocol_wine/ftnoir-wrapper-wine-main.cxx
@@ -1,6 +1,8 @@
#include <errno.h>
#include <stdio.h>
-#include "ftnoir_protocol_wine/fttypes.h"
+#include "ftnoir_protocol_ft/fttypes.h"
+#include "ftnoir_protocol_wine/wine-shm.h"
+#include "ftnoir_tracker_base/ftnoir_tracker_types.h"
class ShmPosix {
public:
ShmPosix(const char *shmName, const char *mutexName, int mapSize);
@@ -39,7 +41,7 @@ int main(void)
WineSHM* shm_posix = (WineSHM*) lck_posix.mem;
FTMemMap* shm_wine = (FTMemMap*) lck_wine.mem;
TFreeTrackData* data = &shm_wine->data;
- while (!shm_posix->stop) {
+ while (1) {
(void) Sleep(10);
lck_posix.lock();
if (shm_posix->stop) {
@@ -47,15 +49,19 @@ int main(void)
break;
}
lck_wine.lock();
- data->Yaw = shm_posix->rx;
- data->Pitch = shm_posix->ry;
- data->Roll = shm_posix->rz;
- data->X = shm_posix->tx;
- data->Y = shm_posix->ty;
- data->Z = shm_posix->tz;
+ data->Yaw = shm_posix->data[RX];
+ data->Pitch = shm_posix->data[RY];
+ data->Roll = shm_posix->data[RZ];
+ data->X = shm_posix->data[TX];
+ data->Y = shm_posix->data[TY];
+ data->Z = shm_posix->data[TZ];
data->DataID = 1;
data->CamWidth = 250;
data->CamHeight = 100;
+ shm_wine->GameID2 = shm_posix->gameid2;
+ shm_posix->gameid = shm_wine->GameID;
+ for (int i = 0; i < 8; i++)
+ shm_wine->table[i] = shm_posix->table[i];
lck_wine.unlock();
lck_posix.unlock();
}