summaryrefslogtreecommitdiff
path: root/plugins/dfinput/cfg.c
diff options
context:
space:
mode:
authorStelios Tsampas <loathingkernel@gmail.com>2017-07-18 23:23:47 +0300
committerStelios Tsampas <loathingkernel@gmail.com>2017-07-19 10:38:24 +0300
commitb6129143f75cf4480883e467d52627de949466fb (patch)
treeef0717711d2b5c37dceb961061fe434afdd7c18a /plugins/dfinput/cfg.c
parent966a413dda34bf31826ee1eab4d5a722a36087d6 (diff)
downloadpcsxr-b6129143f75cf4480883e467d52627de949466fb.tar.gz
* Add setting to disable physical gamepad vibration.
Diffstat (limited to 'plugins/dfinput/cfg.c')
-rwxr-xr-xplugins/dfinput/cfg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/dfinput/cfg.c b/plugins/dfinput/cfg.c
index f1d16673..622c3c34 100755
--- a/plugins/dfinput/cfg.c
+++ b/plugins/dfinput/cfg.c
@@ -37,6 +37,8 @@ static void SetDefaultConfig() {
g.cfg.PadDef[0].VisualVibration = 0;
g.cfg.PadDef[1].VisualVibration = 0;
+ g.cfg.PadDef[0].PhysicalVibration = 1;
+ g.cfg.PadDef[1].PhysicalVibration = 1;
// Pad1 keyboard
g.cfg.PadDef[0].KeyDef[DKEY_SELECT].Key = XK_c;
@@ -164,6 +166,8 @@ void LoadPADConfig() {
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, "PhysicalVibration=", 18) == 0) {
+ g.cfg.PadDef[current].PhysicalVibration = atoi(&buf[18]);
} else if (strncmp(buf, "EmuDev=", 7) == 0) {
g.cfg.E.DevNum = atoi(&buf[5]);
} else if (strncmp(buf, "EMU_FASTFORWARDS=", 17) == 0) {
@@ -362,6 +366,7 @@ void SavePADConfig() {
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, "PhysicalVibration=%d\n", g.cfg.PadDef[i].PhysicalVibration);
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);