summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2010-06-13 09:26:00 +0000
committerhrydgard <hrydgard@gmail.com>2010-06-13 09:26:00 +0000
commit7c47cd2ae585cbda208c4796b5e1acc1cdba7c7e (patch)
tree8db99cae23c0a4aad3eb29a28f732f61d2f59ba9 /Source/Core/InputCommon
parent8cae2fee56c56fdd87c8b3c11aa6614c6aec7651 (diff)
Rename pluginspecs_pad.h to GCPadStatus.h, and move it into InputCommon.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5671 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/InputCommon')
-rw-r--r--Source/Core/InputCommon/InputCommon.vcproj4
-rw-r--r--Source/Core/InputCommon/Src/ControllerEmu.h12
-rw-r--r--Source/Core/InputCommon/Src/GCPadStatus.h39
3 files changed, 49 insertions, 6 deletions
diff --git a/Source/Core/InputCommon/InputCommon.vcproj b/Source/Core/InputCommon/InputCommon.vcproj
index 6c0f8ea4e8..7612b3fd06 100644
--- a/Source/Core/InputCommon/InputCommon.vcproj
+++ b/Source/Core/InputCommon/InputCommon.vcproj
@@ -497,6 +497,10 @@
>
</File>
<File
+ RelativePath=".\Src\GCPadStatus.h"
+ >
+ </File>
+ <File
RelativePath=".\Src\InputCommon.h"
>
</File>
diff --git a/Source/Core/InputCommon/Src/ControllerEmu.h b/Source/Core/InputCommon/Src/ControllerEmu.h
index 90170c21cd..dbe2ec3491 100644
--- a/Source/Core/InputCommon/Src/ControllerEmu.h
+++ b/Source/Core/InputCommon/Src/ControllerEmu.h
@@ -21,17 +21,17 @@
// windows crap
#define NOMINMAX
-#include "pluginspecs_pad.h"
+#include <cmath>
+#include <vector>
+#include <string>
+#include <algorithm>
+
+#include "GCPadStatus.h"
#include "pluginspecs_wiimote.h"
-#include <math.h>
#include "ControllerInterface/ControllerInterface.h"
#include "IniFile.h"
-#include <vector>
-#include <string>
-#include <algorithm>
-
#define sign(x) ((x)?(x)<0?-1:1:0)
enum
diff --git a/Source/Core/InputCommon/Src/GCPadStatus.h b/Source/Core/InputCommon/Src/GCPadStatus.h
new file mode 100644
index 0000000000..138a79e1ba
--- /dev/null
+++ b/Source/Core/InputCommon/Src/GCPadStatus.h
@@ -0,0 +1,39 @@
+#ifndef _GCPAD_H_INCLUDED__
+#define _GCPAD_H_INCLUDED__
+
+#define PAD_ERR_NONE 0
+#define PAD_ERR_NO_CONTROLLER -1
+#define PAD_ERR_NOT_READY -2
+#define PAD_ERR_TRANSFER -3
+
+#define PAD_USE_ORIGIN 0x0080
+
+#define PAD_BUTTON_LEFT 0x0001
+#define PAD_BUTTON_RIGHT 0x0002
+#define PAD_BUTTON_DOWN 0x0004
+#define PAD_BUTTON_UP 0x0008
+#define PAD_TRIGGER_Z 0x0010
+#define PAD_TRIGGER_R 0x0020
+#define PAD_TRIGGER_L 0x0040
+#define PAD_BUTTON_A 0x0100
+#define PAD_BUTTON_B 0x0200
+#define PAD_BUTTON_X 0x0400
+#define PAD_BUTTON_Y 0x0800
+#define PAD_BUTTON_START 0x1000
+
+typedef struct
+{
+ unsigned short button; // Or-ed PAD_BUTTON_* and PAD_TRIGGER_* bits
+ unsigned char stickX; // 0 <= stickX <= 255
+ unsigned char stickY; // 0 <= stickY <= 255
+ unsigned char substickX; // 0 <= substickX <= 255
+ unsigned char substickY; // 0 <= substickY <= 255
+ unsigned char triggerLeft; // 0 <= triggerLeft <= 255
+ unsigned char triggerRight; // 0 <= triggerRight <= 255
+ unsigned char analogA; // 0 <= analogA <= 255
+ unsigned char analogB; // 0 <= analogB <= 255
+ bool MicButton; // HAX
+ signed char err; // one of PAD_ERR_* number
+} SPADStatus;
+
+#endif