dinput: Add JoystickID to the Instance Name
Dmitry Timoshkov
dmitry at baikal.ru
Tue Apr 7 09:17:09 CDT 2015
Aric Stewart <aric at codeweavers.com> wrote:
> + if (SUCCEEDED(IDirectInputDevice2_GetProperty(iface, DIPROP_JOYSTICKID, (LPDIPROPHEADER)&pd)))
> + index = pd.dwData;
Please find a way to avoid the cast.
> + if (SUCCEEDED(IDirectInputDevice2_GetProperty(iface, DIPROP_JOYSTICKID, (LPDIPROPHEADER)&pd)))
> + index = pd.dwData;
Same here.
> + snprintf(buffer, MAX_PATH, "Joystick %d", index);
'index' is unsigned, sizeof() instead of a hardcoded value is better.
--
Dmitry.
More information about the wine-devel
mailing list