Commit 2460b457 authored by Christoph Frick's avatar Christoph Frick Committed by Alexandre Julliard

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

parent 97fed19a
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment