Re: dinput: Add JoystickID to the Instance Name
7 Apr
2015
7 Apr
'15
2:17 p.m.
Aric Stewart <aric(a)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.
3905
Age (days ago)
3905
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Timoshkov