From 536e7601cb2068e415ea1632e27d76aa8b6353c8 Mon Sep 17 00:00:00 2001 From: "SND\\edgbla_cp" Date: Thu, 3 Nov 2011 20:54:08 +0000 Subject: dfinput: visual vibration option. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@71989 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/dfinput/cfg.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'plugins/dfinput/cfg.c') 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, -- cgit v1.2.3