Ken Thomases : winmm: For Mac, fix joyGetPosEx() to put number of buttons pressed in dwButtonNumber field.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Mar 24 10:00:43 CDT 2015
Module: wine
Branch: master
Commit: edad520235881be74090dfdcca9e8a3d1823c770
URL: http://source.winehq.org/git/wine.git/?a=commit;h=edad520235881be74090dfdcca9e8a3d1823c770
Author: Ken Thomases <ken at codeweavers.com>
Date: Mon Mar 23 16:40:51 2015 -0500
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 cb66c47..da45450 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++;
}
}
}
More information about the wine-cvs
mailing list