summaryrefslogtreecommitdiffhomepage
path: root/freetrackclient
diff options
context:
space:
mode:
Diffstat (limited to 'freetrackclient')
-rw-r--r--freetrackclient/freetrackclient.c15
-rw-r--r--freetrackclient/fttypes.h71
2 files changed, 43 insertions, 43 deletions
diff --git a/freetrackclient/freetrackclient.c b/freetrackclient/freetrackclient.c
index 7f085af4..80169771 100644
--- a/freetrackclient/freetrackclient.c
+++ b/freetrackclient/freetrackclient.c
@@ -18,10 +18,6 @@
* * created by the FreeTrack developers. *
*/
-#ifndef _MSC_VER
-# warning "expect misnamed symbols"
-#endif
-
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wvariadic-macros"
#pragma GCC diagnostic ignored "-Wunused-parameter"
@@ -32,7 +28,12 @@
#include "fttypes.h"
-#define FT_EXPORT(t) t __stdcall
+#if defined _MSC_VER && !defined _WIN64
+# define FT_EXPORT(t) t __stdcall
+#else
+# define FT_EXPORT(t) __declspec(dllexport) t
+#endif
+
#if 0
# include <stdio.h>
@@ -110,10 +111,10 @@ FT_EXPORT(const char*) FTProvider(void)
return dllProvider;
}
-#ifdef _MSC_VER
+#if defined _MSC_VER && !defined _WIN64
#pragma comment (linker, "/export:FTReportID=_FTReportID@4")
#pragma comment (linker, "/export:FTReportName=_FTReportName@4")
#pragma comment (linker, "/export:FTGetDllVersion=_FTGetDllVersion@0")
#pragma comment (linker, "/export:FTProvider=_FTProvider@0")
#pragma comment (linker, "/export:FTGetData=_FTGetData@4")
-#endif \ No newline at end of file
+#endif
diff --git a/freetrackclient/fttypes.h b/freetrackclient/fttypes.h
index 050ffc02..a3abea54 100644
--- a/freetrackclient/fttypes.h
+++ b/freetrackclient/fttypes.h
@@ -19,51 +19,50 @@
#pragma once
-#ifndef _MSC_VER
-# include <inttypes.h>
-#else
-typedef unsigned __int32 uint32_t;
-typedef __int32 int32_t;
-#endif
+#include <inttypes.h>
#define FREETRACK_HEAP "FT_SharedMem"
#define FREETRACK_MUTEX "FT_Mutext"
/* only 6 headpose floats and the data id are filled -sh */
-typedef struct __FTData {
- volatile unsigned int DataID;
- volatile int CamWidth;
- volatile int CamHeight;
+typedef struct FTData__ {
+ uint32_t DataID;
+ int32_t CamWidth;
+ int32_t CamHeight;
/* virtual pose */
- volatile float Yaw; /* positive yaw to the left */
- volatile float Pitch; /* positive pitch up */
- volatile float Roll; /* positive roll to the left */
- volatile float X;
- volatile float Y;
- volatile float Z;
+ float Yaw; /* positive yaw to the left */
+ float Pitch; /* positive pitch up */
+ float Roll; /* positive roll to the left */
+ float X;
+ float Y;
+ float Z;
/* raw pose with no smoothing, sensitivity, response curve etc. */
- volatile float RawYaw;
- volatile float RawPitch;
- volatile float RawRoll;
- volatile float RawX;
- volatile float RawY;
- volatile float RawZ;
+ float RawYaw;
+ float RawPitch;
+ float RawRoll;
+ float RawX;
+ float RawY;
+ float RawZ;
/* raw points, sorted by Y, origin top left corner */
- volatile float X1;
- volatile float Y1;
- volatile float X2;
- volatile float Y2;
- volatile float X3;
- volatile float Y3;
- volatile float X4;
- volatile float Y4;
-} FTData;
+ float X1;
+ float Y1;
+ float X2;
+ float Y2;
+ float X3;
+ float Y3;
+ float X4;
+ float Y4;
+} volatile FTData;
/* we add some shit at the end for other legacy proto, sadly */
-typedef struct __FTHeap {
+typedef struct FTHeap__ {
FTData data;
- volatile int32_t GameID;
- volatile unsigned char table[8];
- volatile int32_t GameID2;
-} FTHeap;
+ int32_t GameID;
+ union
+ {
+ unsigned char table[8];
+ int32_t table_ints[2];
+ };
+ int32_t GameID2;
+} volatile FTHeap;