summaryrefslogtreecommitdiff
path: root/macosx/plugins/HIDInput/src/PlugPAD.c
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-11-02 11:10:33 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-11-02 11:10:33 +0000
commit86b69df9d516234b36ab8abc213f0f28094bb8a6 (patch)
treeb8574a98ffe740421ed4b44f54b732b971f216f4 /macosx/plugins/HIDInput/src/PlugPAD.c
parentd9a03cd9252c47946dacb48a767f1cbbaf6450ee (diff)
downloadpcsxr-86b69df9d516234b36ab8abc213f0f28094bb8a6.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@34859 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/HIDInput/src/PlugPAD.c')
-rw-r--r--macosx/plugins/HIDInput/src/PlugPAD.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/macosx/plugins/HIDInput/src/PlugPAD.c b/macosx/plugins/HIDInput/src/PlugPAD.c
index c4f07eb2..73f0131f 100644
--- a/macosx/plugins/HIDInput/src/PlugPAD.c
+++ b/macosx/plugins/HIDInput/src/PlugPAD.c
@@ -3,10 +3,12 @@
#include "HID_Utilities.h"
#include "PlugPAD.h"
-
/////////////////////////////////////////////////////////
typedef void* HWND;
-#include "PSEmu_Plugin_Defs.h"
+#include "psemu_plugin_defs.h"
+
+long DoConfiguration();
+void DoAbout();
const char *LibName = "HIDInput";
const int version = 0;
@@ -100,7 +102,7 @@ long PADconfigure(void) {
HIDBuildDeviceList(kHIDPage_GenericDesktop, 0);
}
}
-
+
return DoConfiguration();
}
@@ -153,23 +155,23 @@ long _readPortX(PadDataS *data, int port)
buttonState &= ~(1 << keys[i].button);
}
}
-
+
for (i=0; i<gNumAxes[port]; i++) {
long value = HIDGetElementValue(axes[i].device, axes[i].element);
-
+
if (value != axes[i].lastValue) {
axes[i].lastValue = value;
-
+
if (axes[i].element->usagePage == kHIDPage_GenericDesktop &&
axes[i].element->usage >= kHIDUsage_GD_X && axes[i].element->usage <= kHIDUsage_GD_Rz) {
/* axis input device */
value = HIDCalibrateValue(value, axes[i].element);
value = HIDScaleValue(value, axes[i].element);
if (!axes[i].positive) value = 255-value;
-
+
if (value >= 127) {
if (axes[i].reverse) value = 255-value;
-
+
switch (axes[i].axis) {
case 0: data->rightJoyX = value; break;
case 1: data->rightJoyY = value; break;