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.
This commit is contained in:
Ken Thomases 2015-03-23 16:40:51 -05:00 committed by Alexandre Julliard
parent 4a7b5856da
commit edad520235
1 changed files with 1 additions and 2 deletions

View File

@ -678,8 +678,7 @@ LRESULT driver_joyGetPosEx(DWORD_PTR device_id, JOYINFOEX* info)
if (value) if (value)
{ {
info->dwButtons |= 1 << i; info->dwButtons |= 1 << i;
if (!info->dwButtonNumber) info->dwButtonNumber++;
info->dwButtonNumber = i + 1;
} }
} }
} }