summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Protocol_PPJOY/PPJIoctl.h
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2011-04-07 17:45:01 +0000
committerWim Vriend <facetracknoir@gmail.com>2011-04-07 17:45:01 +0000
commit803b200ff1b3bc1e9eb1e167ed38379370febc13 (patch)
treeeb1ee9927cc451bf1ff660a8842d5e9a4d2b8e98 /FTNoIR_Protocol_PPJOY/PPJIoctl.h
parent394dca378432d8ba65dd84432ea1a85ddea636fd (diff)
PPJoy in DLL
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@66 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FTNoIR_Protocol_PPJOY/PPJIoctl.h')
-rw-r--r--FTNoIR_Protocol_PPJOY/PPJIoctl.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/FTNoIR_Protocol_PPJOY/PPJIoctl.h b/FTNoIR_Protocol_PPJOY/PPJIoctl.h
new file mode 100644
index 00000000..c406224f
--- /dev/null
+++ b/FTNoIR_Protocol_PPJOY/PPJIoctl.h
@@ -0,0 +1,32 @@
+#ifndef __PPJIOCTL_H__
+#define __PPJIOCTL_H__
+
+#include "Windows.h"
+
+/* Define to use byte-size values for joystick axes, else dword size */
+#undef UCHAR_AXES
+
+#define PPJOY_AXIS_MIN 1
+#ifdef UCHAR_AXES
+#define PPJOY_AXIS_MAX 127
+#else
+#define PPJOY_AXIS_MAX 32767
+#endif
+
+#define FILE_DEVICE_PPORTJOY FILE_DEVICE_UNKNOWN
+
+#define PPORTJOY_IOCTL(_index_) \
+ CTL_CODE (FILE_DEVICE_PPORTJOY, _index_, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+#define IOCTL_PPORTJOY_SET_STATE PPORTJOY_IOCTL (0x0)
+
+#define JOYSTICK_STATE_V1 0x53544143
+
+typedef struct
+{
+ unsigned long Version;
+ unsigned char Data[1];
+} JOYSTICK_SET_STATE, *PJOYSTICK_SET_STATE;
+
+
+#endif