dinput: map_axis must be able to work with LONG's value range.

This commit is contained in:
Christoph Frick 2006-07-07 10:01:42 +02:00 committed by Alexandre Julliard
parent 97fed19afc
commit 2460b4576b
1 changed files with 1 additions and 1 deletions

View File

@ -664,7 +664,7 @@ map_axis(JoystickImpl* This, int axis, int val) {
if (xmin == xmax) return val;
/* map the value from the hmin-hmax range into the wmin-wmax range */
ret = ((val-hmin) * (wmax-wmin)) / (hmax-hmin) + wmin;
ret = MulDiv( val - hmin, wmax - wmin, hmax - hmin ) + wmin;
TRACE("xmin=%d xmax=%d hmin=%d hmax=%d wmin=%d wmax=%d val=%d ret=%d\n", xmin, xmax, hmin, hmax, wmin, wmax, val, ret);