summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_vjoy
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-09-15 16:00:25 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-09-15 16:00:25 +0200
commite481697ea6e156e456f3d51ba7c816ad4a908792 (patch)
tree5277231639a363dd17665ef6b7e76e88d3d1bf71 /ftnoir_protocol_vjoy
parent490f3ddb79018d13182fc17bb92943bbe427643d (diff)
Fix mingw-w64 cross-compile from Linux
Case-sensitivity and MSVC-isms bite again.
Diffstat (limited to 'ftnoir_protocol_vjoy')
-rw-r--r--ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h
index 5c260d2e..30d89572 100644
--- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h
+++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h
@@ -28,8 +28,8 @@
#pragma once
#include "ftnoir_protocol_base/ftnoir_protocol_base.h"
#include "ui_ftnoir_vjoy_controls.h"
-#include <Windows.h>
-#include <VJoy.h>
+#include <windows.h>
+
#include <QThread>
#include <QUdpSocket>
#include <QMessageBox>
@@ -92,3 +92,30 @@ public:
void getIcon(QIcon *icon) { *icon = QIcon(":/images/vjoy.png"); }
};
+
+#define VJOY_AXIS_MIN -32768
+#define VJOY_AXIS_NIL 0
+#define VJOY_AXIS_MAX 32767
+
+#include <pshpack1.h>
+
+typedef struct _JOYSTICK_STATE
+{
+ UCHAR ReportId; // Report Id
+ SHORT XAxis; // X Axis
+ SHORT YAxis; // Y Axis
+ SHORT ZAxis; // Z Axis
+ SHORT XRotation; // X Rotation
+ SHORT YRotation; // Y Rotation
+ SHORT ZRotation; // Z Rotation
+ SHORT Slider; // Slider
+ SHORT Dial; // Dial
+ USHORT POV; // POV
+ UINT32 Buttons; // 32 Buttons
+} JOYSTICK_STATE, * PJOYSTICK_STATE;
+
+#include <poppack.h>
+
+extern "C" BOOL __stdcall VJoy_Initialize(PCHAR name, PCHAR serial);
+extern "C" VOID __stdcall VJoy_Shutdown();
+extern "C" BOOL __stdcall VJoy_UpdateJoyState(int id, PJOYSTICK_STATE pJoyState);