]> Devoid-pointer.net GitWeb - KLGD_FF_plugin.git/commitdiff
Emulate FF_PERIODIC through FF_RUMBLE
authorMichal Malý <madcatxster@devoid-pointer.net>
Fri, 2 Oct 2015 22:58:02 +0000 (00:58 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Fri, 2 Oct 2015 22:58:02 +0000 (00:58 +0200)
plugin/klgd_ff_plugin.c
testmod/klgdff.c

index 8a29bb15c16597943491082d7a309b5aea8ceb0e..076b1b049b09ff8eb7beda7d005d7bc0457d7ac2 100644 (file)
@@ -1664,7 +1664,13 @@ int ffpl_init_plugin(struct klgd_plugin **plugin, struct input_dev *dev, const s
        /** Emulate periodic through rumble */
        if (test_bit(FF_RUMBLE, dev->ffbit) && !test_bit(FF_PERIODIC, dev->ffbit)) {
                printk(KERN_NOTICE "KLGDFF: Emulating FF_PERIODIC through FF_RUMBLE\n");
+               /* Fake full support of periodic effects*/
                input_set_capability(dev, EV_FF, FF_PERIODIC);
+                       input_set_capability(dev, EV_FF, FF_SINE);
+                       input_set_capability(dev, EV_FF, FF_SQUARE);
+                       input_set_capability(dev, EV_FF, FF_SAW_UP);
+                       input_set_capability(dev, EV_FF, FF_SAW_DOWN);
+                       input_set_capability(dev, EV_FF, FF_TRIANGLE);
                priv->memless_periodic_emul = true;
        }
 
index c2e03d287f1a55bb8bf9a2584e47b094504d1074..edd43aa3eb49e65225dbd05fa868a12f86d8df05 100644 (file)
@@ -380,13 +380,13 @@ static int __init klgdff_init(void)
        gain = 0xFFFF;
 
        input_set_capability(dev, EV_FF, FF_CONSTANT);
-       //input_set_capability(dev, EV_FF, FF_RUMBLE);
-       input_set_capability(dev, EV_FF, FF_PERIODIC);
+       input_set_capability(dev, EV_FF, FF_RUMBLE);
+       /*input_set_capability(dev, EV_FF, FF_PERIODIC);
                input_set_capability(dev, EV_FF, FF_SINE);
                input_set_capability(dev, EV_FF, FF_SQUARE);
                input_set_capability(dev, EV_FF, FF_SAW_UP);
                input_set_capability(dev, EV_FF, FF_SAW_DOWN);
-               input_set_capability(dev, EV_FF, FF_TRIANGLE);
+               input_set_capability(dev, EV_FF, FF_TRIANGLE);*/
        input_set_capability(dev, EV_FF, FF_RAMP);
        input_set_capability(dev, EV_FF, FF_SPRING);