aboutsummaryrefslogtreecommitdiff
path: root/plugins/dfinput
diff options
context:
space:
mode:
authornotaz2011-12-09 18:35:09 +0200
committernotaz2011-12-10 23:10:37 +0200
commitb944a30eda75c36c94ef71e7768497801887612b (patch)
treee532f62cb75cd19df9a673816c849cbc58da59ab /plugins/dfinput
parent8aea5f5ac9382379622991974bded6b08f328ddc (diff)
downloadpcsx_rearmed-b944a30eda75c36c94ef71e7768497801887612b.tar.gz
pcsx_rearmed-b944a30eda75c36c94ef71e7768497801887612b.tar.bz2
pcsx_rearmed-b944a30eda75c36c94ef71e7768497801887612b.zip
add vibration support for Caanoo
Diffstat (limited to 'plugins/dfinput')
-rw-r--r--plugins/dfinput/main.h4
-rw-r--r--plugins/dfinput/pad.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/plugins/dfinput/main.h b/plugins/dfinput/main.h
index ee30165..3492170 100644
--- a/plugins/dfinput/main.h
+++ b/plugins/dfinput/main.h
@@ -24,3 +24,7 @@ extern long (*PAD2_readPort2)(PadDataS *pad);
#define GUNIN_BTNB (1<<2)
#define GUNIN_TRIGGER2 (1<<3) /* offscreen trigger */
extern void pl_update_gun(int *xn, int *xres, int *y, int *in);
+
+/* vibration trigger to frontend */
+extern int in_enable_vibration;
+extern void plat_trigger_vibrate(void);
diff --git a/plugins/dfinput/pad.c b/plugins/dfinput/pad.c
index 90fde88..ab55db0 100644
--- a/plugins/dfinput/pad.c
+++ b/plugins/dfinput/pad.c
@@ -203,6 +203,11 @@ static void do_cmd2(unsigned char value)
break;
}
break;
+
+ case CMD_READ_DATA_AND_VIBRATE:
+ if (value == 1 && CurPad == 0 && in_enable_vibration)
+ plat_trigger_vibrate();
+ break;
}
}