summaryrefslogtreecommitdiff
path: root/plugins/dfinput/pad.h
diff options
context:
space:
mode:
authorSND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-04-16 21:58:47 +0000
committerSND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-04-16 21:58:47 +0000
commit32a5e70e9134f933756a96e547dcdd718b8d5f1e (patch)
tree0ba88391433d9157f96eb484d6de5975ff097181 /plugins/dfinput/pad.h
parent733612551879e081161604a6e10b7e5fdfe0f89e (diff)
downloadpcsxr-32a5e70e9134f933756a96e547dcdd718b8d5f1e.tar.gz
GTK: dfinput added emulator key (hotkey) mapping to keyboard or controller. Existing hotkeys are hard coded like F1 for savestate, but now it can have an alias hotkey on keyboard s button for example. These can be configured from dfinput dialog. Also added support for fastforward key (tilde / section key). Currently only dfxvideo supports it by full extent. Hopefully someone can merge these changes to Windows build.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@84102 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfinput/pad.h')
-rwxr-xr-xplugins/dfinput/pad.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/plugins/dfinput/pad.h b/plugins/dfinput/pad.h
index 3249f6b3..2b69f111 100755
--- a/plugins/dfinput/pad.h
+++ b/plugins/dfinput/pad.h
@@ -83,11 +83,11 @@ extern char* PLUGLOC(char* toloc);
#define _(x) (x)
#define N_(x) (x)
#endif
-
+
#if SDL_VERSION_ATLEAST(1,3,0)
extern int has_haptic;
#endif
-
+
int JoyHapticRumble(int pad, uint32_t low, uint32_t high);
enum {
@@ -113,6 +113,16 @@ enum {
};
enum {
+ EMU_INCREMENTSTATE=0,
+ EMU_FASTFORWARDS,
+ EMU_LOADSTATE,
+ EMU_SAVESTATE,
+ EMU_SCREENSHOT,
+
+ EMU_TOTAL
+};
+
+enum {
ANALOG_LEFT = 0,
ANALOG_RIGHT,
@@ -130,6 +140,7 @@ typedef struct tagKeyDef {
uint16_t Button; // button number
} J;
uint16_t Key;
+ uint8_t ReleaseEventPending;
} KEYDEF;
enum { ANALOG_XP = 0, ANALOG_XM, ANALOG_YP, ANALOG_YM };
@@ -142,17 +153,29 @@ typedef struct tagPadDef {
KEYDEF AnalogDef[ANALOG_TOTAL][4];
} PADDEF;
+typedef struct tagEmuDef {
+ uint16_t EmuKeyEvent;
+ KEYDEF Mapping;
+} EMUDEF;
+
+typedef struct tagEmuDef2{
+ EMUDEF EmuDef[EMU_TOTAL];
+ SDL_Joystick *EmuKeyDev;
+ int8_t DevNum;
+} EMUDEF2;
+
typedef struct tagConfig {
uint8_t Threaded;
- uint8_t HideCursor;
+ uint8_t HideCursor;
PADDEF PadDef[2];
+ EMUDEF2 E;
} CONFIG;
typedef struct tagPadState {
SDL_Joystick *JoyDev;
uint8_t PadMode;
uint8_t PadID;
- uint8_t PadModeKey;
+ uint8_t PadModeKey;
volatile uint8_t PadModeSwitch;
volatile uint16_t KeyStatus;
volatile uint16_t JoyKeyStatus;