Aric Stewart aric@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.