summaryrefslogtreecommitdiff
path: root/plugins/dfinput/cfg.c
diff options
context:
space:
mode:
authorSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-03 20:54:08 +0000
committerSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-03 20:54:08 +0000
commit536e7601cb2068e415ea1632e27d76aa8b6353c8 (patch)
treef8585650813f8048b71958c452ca2d43aac76410 /plugins/dfinput/cfg.c
parent363e63c11d97a4370d81ad48befdeaa0599ac888 (diff)
downloadpcsxr-536e7601cb2068e415ea1632e27d76aa8b6353c8.tar.gz
dfinput: visual vibration option.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@71989 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfinput/cfg.c')
-rw-r--r--plugins/dfinput/cfg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/dfinput/cfg.c b/plugins/dfinput/cfg.c
index 3ac9dfa8..058dbdf5 100644
--- a/plugins/dfinput/cfg.c
+++ b/plugins/dfinput/cfg.c
@@ -34,6 +34,9 @@ static void SetDefaultConfig() {
g.cfg.PadDef[0].Type = PSE_PAD_TYPE_STANDARD;
g.cfg.PadDef[1].Type = PSE_PAD_TYPE_STANDARD;
+ g.cfg.PadDef[0].VisualVibration = 0;
+ g.cfg.PadDef[1].VisualVibration = 0;
+
// Pad1 keyboard
g.cfg.PadDef[0].KeyDef[DKEY_SELECT].Key = XK_c;
g.cfg.PadDef[0].KeyDef[DKEY_START].Key = XK_v;
@@ -142,6 +145,8 @@ void LoadPADConfig() {
g.cfg.PadDef[current].DevNum = atoi(&buf[7]);
} else if (strncmp(buf, "Type=", 5) == 0) {
g.cfg.PadDef[current].Type = atoi(&buf[5]);
+ } else if (strncmp(buf, "VisualVibration=", 16) == 0) {
+ g.cfg.PadDef[current].VisualVibration = atoi(&buf[16]);
} else if (strncmp(buf, "Select=", 7) == 0) {
sscanf(buf, "Select=%d,%d,%d", &a, &b, &c);
g.cfg.PadDef[current].KeyDef[DKEY_SELECT].Key = a;
@@ -291,7 +296,8 @@ void SavePADConfig() {
fprintf(fp, "[PAD%d]\n", i + 1);
fprintf(fp, "DevNum=%d\n", g.cfg.PadDef[i].DevNum);
fprintf(fp, "Type=%d\n", g.cfg.PadDef[i].Type);
-
+ fprintf(fp, "VisualVibration=%d\n", g.cfg.PadDef[i].VisualVibration);
+
fprintf(fp, "Select=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_SELECT].Key,
g.cfg.PadDef[i].KeyDef[DKEY_SELECT].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_SELECT].J.d);
fprintf(fp, "L3=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_L3].Key,