summaryrefslogtreecommitdiff
path: root/plugins/dfinput/cfg.c
diff options
context:
space:
mode:
authorSND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-03-10 13:25:33 +0000
committerSND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-03-10 13:25:33 +0000
commit8ee251f1379ffab7d0fd914429e834ae672afc57 (patch)
tree0c1777bce792bc9e38931ab7c5aa2cd787c34f5a /plugins/dfinput/cfg.c
parent1b70fa81feaca1d699357e99a5718df50f400b65 (diff)
downloadpcsxr-8ee251f1379ffab7d0fd914429e834ae672afc57.tar.gz
Fixed issue #8061 (by darktjm).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@64383 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfinput/cfg.c')
-rw-r--r--plugins/dfinput/cfg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/dfinput/cfg.c b/plugins/dfinput/cfg.c
index ce9a97f2..64c60a2d 100644
--- a/plugins/dfinput/cfg.c
+++ b/plugins/dfinput/cfg.c
@@ -48,6 +48,7 @@ static void SetDefaultConfig() {
g.cfg.PadDef[0].KeyDef[DKEY_CIRCLE].Key = XK_x;
g.cfg.PadDef[0].KeyDef[DKEY_CROSS].Key = XK_z;
g.cfg.PadDef[0].KeyDef[DKEY_SQUARE].Key = XK_s;
+ g.cfg.PadDef[0].KeyDef[DKEY_ANALOG].Key = XK_b;
// Pad1 joystick
g.cfg.PadDef[0].KeyDef[DKEY_SELECT].JoyEvType = BUTTON;
@@ -153,6 +154,11 @@ void LoadPADConfig() {
g.cfg.PadDef[current].KeyDef[DKEY_R3].Key = a;
g.cfg.PadDef[current].KeyDef[DKEY_R3].JoyEvType = b;
g.cfg.PadDef[current].KeyDef[DKEY_R3].J.d = c;
+ } else if (strncmp(buf, "Analog=", 7) == 0) {
+ sscanf(buf, "Analog=%d,%d,%d", &a, &b, &c);
+ g.cfg.PadDef[current].KeyDef[DKEY_ANALOG].Key = a;
+ g.cfg.PadDef[current].KeyDef[DKEY_ANALOG].JoyEvType = b;
+ g.cfg.PadDef[current].KeyDef[DKEY_ANALOG].J.d = c;
} else if (strncmp(buf, "Start=", 6) == 0) {
sscanf(buf, "Start=%d,%d,%d", &a, &b, &c);
g.cfg.PadDef[current].KeyDef[DKEY_START].Key = a;
@@ -288,6 +294,8 @@ void SavePADConfig() {
g.cfg.PadDef[i].KeyDef[DKEY_L3].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_L3].J.d);
fprintf(fp, "R3=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_R3].Key,
g.cfg.PadDef[i].KeyDef[DKEY_R3].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_R3].J.d);
+ fprintf(fp, "Analog=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_ANALOG].Key,
+ g.cfg.PadDef[i].KeyDef[DKEY_ANALOG].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_ANALOG].J.d);
fprintf(fp, "Start=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_START].Key,
g.cfg.PadDef[i].KeyDef[DKEY_START].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_START].J.d);
fprintf(fp, "Up=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_UP].Key,