From edad520235881be74090dfdcca9e8a3d1823c770 Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Mon, 23 Mar 2015 16:40:51 -0500 Subject: [PATCH] winmm: For Mac, fix joyGetPosEx() to put number of buttons pressed in dwButtonNumber field. Based on behavior of Windows revealed by interactive tests added by Bruno Jesus. --- dlls/winejoystick.drv/joystick_osx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/winejoystick.drv/joystick_osx.c b/dlls/winejoystick.drv/joystick_osx.c index cb66c47f8dc..da454508646 100644 --- a/dlls/winejoystick.drv/joystick_osx.c +++ b/dlls/winejoystick.drv/joystick_osx.c @@ -678,8 +678,7 @@ LRESULT driver_joyGetPosEx(DWORD_PTR device_id, JOYINFOEX* info) if (value) { info->dwButtons |= 1 << i; - if (!info->dwButtonNumber) - info->dwButtonNumber = i + 1; + info->dwButtonNumber++; } } } -- 2.11.4.GIT