Update of /cvsroot/linuxconsole/ruby/utils
In directory usw-pr-cvs1:/tmp/cvs-serv28453
Modified Files:
fftest.c
Log Message:
Added timing information to rumble effects
Index: fftest.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/utils/fftest.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- fftest.c 10 Mar 2002 17:02:53 -0000 1.17
+++ fftest.c 8 Apr 2002 21:16:13 -0000 1.18
@@ -24,6 +24,7 @@
* Johann Deneux <de...@if...>
*/
+#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -31,7 +32,6 @@
#include <unistd.h>
#include <string.h>
#include <sys/ioctl.h>
-#include <stdio.h>
#define BITS_PER_LONG (sizeof(long) * 8)
#define OFF(x) ((x)%BITS_PER_LONG)
@@ -195,6 +195,8 @@
effects[4].id = -1;
effects[4].u.rumble.strong_magnitude = 0x8000;
effects[4].u.rumble.weak_magnitude = 0;
+ effects[4].replay.length = 5000;
+ effects[4].replay.delay = 1000;
if (ioctl(fd, EVIOCSFF, &effects[4]) == -1) {
perror("Upload effects[4]");
@@ -205,6 +207,8 @@
effects[5].id = -1;
effects[5].u.rumble.strong_magnitude = 0;
effects[5].u.rumble.weak_magnitude = 0xc000;
+ effects[5].replay.length = 5000;
+ effects[5].replay.delay = 0;
if (ioctl(fd, EVIOCSFF, &effects[5]) == -1) {
perror("Upload effects[5]");
@@ -226,6 +230,11 @@
}
printf("Now Playing: %s\n", effect_names[i]);
+ }
+ else if (i == -2) {
+ /* Crash test */
+ int i = *((int *)0);
+ printf("Crash test: %d\n", i);
}
else {
printf("No such effect\n");
|