From 41e7b60e2e6397c4f8ae91495eb74728b6f562c7 Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Fri, 4 Dec 2009 06:43:30 +0000 Subject: git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@38792 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/dfinput/pad.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'plugins/dfinput/pad.h') 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 @@ -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); -- cgit v1.2.3