summaryrefslogtreecommitdiff
path: root/plugins/dfinput/pad.h
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-12-04 06:43:30 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-12-04 06:43:30 +0000
commit41e7b60e2e6397c4f8ae91495eb74728b6f562c7 (patch)
tree5eef9e1efca8afd3db7de140aee70bbbe731e5f6 /plugins/dfinput/pad.h
parentaca57a03bd7fdb0e23ea4f6d979dfe7008648195 (diff)
downloadpcsxr-41e7b60e2e6397c4f8ae91495eb74728b6f562c7.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@38792 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfinput/pad.h')
-rw-r--r--plugins/dfinput/pad.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/dfinput/pad.h b/plugins/dfinput/pad.h
index de63db69..7989e69d 100644
--- a/plugins/dfinput/pad.h
+++ b/plugins/dfinput/pad.h
@@ -23,8 +23,6 @@
extern "C" {
#endif
-//#define EPSXE 1
-
#include "config.h"
#include <stdio.h>
@@ -93,13 +91,13 @@ typedef struct tagKeyDef {
uint16_t Key;
} KEYDEF;
-enum { ANALOG_X = 0, ANALOG_Y };
+enum { ANALOG_XP = 0, ANALOG_XM, ANALOG_YP, ANALOG_YM };
typedef struct tagPadDef {
int8_t DevNum;
uint16_t Type;
KEYDEF KeyDef[DKEY_TOTAL];
- int16_t AnalogDef[ANALOG_TOTAL][2]; // positive=axis+, negative=axis-, abs(Axis)-1=axis index
+ KEYDEF AnalogDef[ANALOG_TOTAL][4];
} PADDEF;
typedef struct tagConfig {
@@ -113,7 +111,8 @@ typedef struct tagPadState {
uint8_t PadID;
volatile uint16_t KeyStatus;
volatile uint16_t JoyKeyStatus;
- volatile uint8_t AnalogStatus[ANALOG_TOTAL][2]; // 0-255 where 128 is center position
+ volatile uint8_t AnalogStatus[ANALOG_TOTAL][2]; // 0-255 where 127 is center position
+ volatile uint8_t AnalogKeyStatus[ANALOG_TOTAL][4];
} PADSTATE;
typedef struct tagGlobalData {
@@ -156,6 +155,8 @@ void CheckKeyboard();
// analog.c functions...
void InitAnalog();
void CheckAnalog();
+int AnalogKeyPressed(uint16_t Key);
+int AnalogKeyReleased(uint16_t Key);
// pad.c functions...
char *PSEgetLibName(void);