]> Devoid-pointer.net GitWeb - KLGD_FF_plugin.git/commitdiff
Downscale from fixed-point calculations correctly.
authorMichal Malý <madcatxster@devoid-pointer.net>
Wed, 22 Jul 2015 10:25:30 +0000 (12:25 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Wed, 22 Jul 2015 10:25:30 +0000 (12:25 +0200)
klgd_ff_plugin.c

index 2886760c9f263936835e024c99a0d7409b439d1c..771d7ebedc263fa78299a455356d27ad971529a9 100644 (file)
@@ -4,7 +4,7 @@
 #include <linux/jiffies.h>
 
 #define DIR_TO_DEGREES(dir) (360 - ((((dir > 0xc000) ? (u32)dir + 0x4000 - 0xffff : (u32)dir + 0x4000) * 360) / 0xffff))
-#define FRAC_16 8
+#define FRAC_16 15
 #define RECALC_DELTA_T_MSEC 20
 
 static int ffpl_handle_state_change(struct klgd_plugin_private *priv, struct klgd_command_stream *s, struct ffpl_effect *eff,