Re: [PATCH 3/6] dinput: SetActionMap setting the device buffer (try 2)

2011-06-28 Thread Lucas Zawacki
The new patches address this issue, make some little corrections that
are pointed in the comments. Also I organized them better, with the
tests first.


2011/6/28 Lucas Zawacki :
>> Do you really need to copy it back?  It looks like an input parameter.
>
> Yes, you're right. In SetActionMap this copy should not be necessary.
> I'll take this code out and roll a new version of the patches.
>




Re: [PATCH 3/6] dinput: SetActionMap setting the device buffer (try 2)

2011-06-28 Thread Lucas Zawacki
> Do you really need to copy it back?  It looks like an input parameter.

Yes, you're right. In SetActionMap this copy should not be necessary.
I'll take this code out and roll a new version of the patches.




Re: [PATCH 3/6] dinput: SetActionMap setting the device buffer (try 2)

2011-06-28 Thread Alexandre Julliard
Lucas Fialho Zawacki  writes:

> +FIXME("(%p)->(%p,%s,%08x): semi-stub !\n", iface, lpdiaf, lpszUserName, 
> dwFlags);
> +
> +diafW.rgoAction = HeapAlloc(GetProcessHeap(), 0, 
> sizeof(DIACTIONW)*lpdiaf->dwNumActions);
> +_copy_diactionformatAtoW(&diafW, lpdiaf);
> +
> +hr = 
> IDirectInputDevice8WImpl_SetActionMap(&This->IDirectInputDevice8W_iface, 
> &diafW, NULL, dwFlags);
> +
> +_copy_diactionformatWtoA(lpdiaf, &diafW);

Do you really need to copy it back?  It looks like an input parameter.

-- 
Alexandre Julliard
julli...@winehq.org




Re: [PATCH 3/6] dinput: SetActionMap setting the device buffer.

2011-06-20 Thread Vitaliy Margolen

On 06/20/2011 04:06 PM, Lucas Fialho Zawacki wrote:

@@ -1391,9 +1391,24 @@ HRESULT WINAPI 
IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface
 LPCSTR lpszUserName,
 DWORD dwFlags)
  {

...

+hr = IDirectInputDevice8_SetActionMap(&This->IDirectInputDevice8W_iface,
+&diafW, NULL, dwFlags);
You need to call IDirectInputDevice8WImpl_SetActionMap directly here. Also 
please don't wrap lines at 80 characters, you can put all that into one 
line. And please be consistent with spacing around parentheses - either put 
spaces on both sides, or don't put at all.



+memset(&dp,0,sizeof(dp));
Please don't needlessly zero structures. You setting most values of it 
anyway. And please don't forget spaces after comas.



Otherwise looks really good!


Vitaliy.