Signed-off-by: Brendan Shanks bshanks@codeweavers.com --- dlls/dinput/joystick_osx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c index 4ec72465500..b91b9d14b12 100644 --- a/dlls/dinput/joystick_osx.c +++ b/dlls/dinput/joystick_osx.c @@ -840,10 +840,10 @@ static void poll_osx_device_state(LPDIRECTINPUTDEVICE8A iface) return; val = IOHIDValueGetIntegerValue(valueRef); oldVal = device->generic.js.rgdwPOV[pov_idx]; - if (val >= 8) + if ((val > device->generic.props[idx].lDevMax) || (val < device->generic.props[idx].lDevMin)) newVal = -1; else - newVal = val * 4500; + newVal = (val - device->generic.props[idx].lDevMin) * 4500; device->generic.js.rgdwPOV[pov_idx] = newVal; TRACE("valueRef %s val %d oldVal %d newVal %d\n", debugstr_cf(valueRef), val, oldVal, newVal); if (oldVal != newVal)
Signed-off-by: Brendan Shanks bshanks@codeweavers.com --- dlls/dinput/joystick_osx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c index b91b9d14b12..58f6b86fc16 100644 --- a/dlls/dinput/joystick_osx.c +++ b/dlls/dinput/joystick_osx.c @@ -661,7 +661,7 @@ static void get_osx_device_elements(JoystickImpl *device, int axis_map[8]) case kIOHIDElementTypeInput_Button: { TRACE("kIOHIDElementTypeInput_Button usage_page %d\n", usage_page); - if (usage_page != kHIDPage_Button) + if ((usage_page != kHIDPage_Button) && (usage_page != kHIDPage_Consumer)) { /* avoid strange elements found on the 360 controller */ continue;