https://bugs.winehq.org/show_bug.cgi?id=39667 Andrew Eikum <aeikum(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum(a)codeweavers.com --- Comment #3 from Andrew Eikum <aeikum(a)codeweavers.com> --- Looking at the patch wine <wine-staging:87f68ad2f>. Some feedback:
+ static const WCHAR emptyW[] = { 0 };
This seems unnecessary. Just assign \0 to dps.wsz[0] or do the strcpy.
+ ps->wsz[0] = 0; + if (This->username) + lstrcpynW(ps->wsz, This->username, sizeof(ps->wsz)/sizeof(WCHAR));
Similar here, no need to assign if This->username is non-NULL.
+ This->username[0] = 0; + if (ps->wsz) + lstrcpynW(This->username, ps->wsz, sizeof(ps->wsz)/sizeof(WCHAR));
And here.
+ WCHAR *username; /* set by 'SetActionMap' */
I'm OK with this as it is, but I would rather allocate the char array as part of the IDirectInputDeviceImpl struct instead of allocating and freeing it separately.
+ ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
These should be "hr == S_OK" or similar. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.