dinput: Remove explicit cast to long as it happens implicitly.
authorMichael Stefaniuc <mstefani@redhat.de>
Tue, 18 May 2010 07:47:10 +0000 (09:47 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 18 May 2010 16:42:09 +0000 (18:42 +0200)
LPDIEFFECT->rglDirection is a LPLONG.

dlls/dinput/effect_linuxinput.c

index 3c86a34489d434da3e83548f646480444fdf50e2..7802271e805d34db2337599ce0dc267c5b640f6f 100644 (file)
@@ -342,8 +342,8 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters(
             return diErr;
         else {
            if (peff->dwFlags & DIEFF_CARTESIAN) {
-               peff->rglDirection[0] = (long)(sin(M_PI * 3 * This->effect.direction / 0x7FFF) * 1000);
-               peff->rglDirection[1] = (long)(cos(M_PI * 3 * This->effect.direction / 0x7FFF) * 1000);
+               peff->rglDirection[0] = sin(M_PI * 3 * This->effect.direction / 0x7FFF) * 1000;
+               peff->rglDirection[1] = cos(M_PI * 3 * This->effect.direction / 0x7FFF) * 1000;
            } else {
                /* Polar and spherical coordinates are the same for two or less
                 * axes.