Commit 04d77f4d authored by Lionel Ulmer's avatar Lionel Ulmer Committed by Alexandre Julliard

- some TRACEing improvements

- fix mouse Acquire which switched right and middle buttons - reset the mouse cursor at its original location on Unacquiring the device
parent 6e28fe71
......@@ -49,7 +49,7 @@ typedef struct {
DataTransform *dt;
} DataFormat;
extern void fill_DataFormat(void *out, void *in, DataFormat *df) ;
extern DataFormat *create_DataFormat(DIDATAFORMAT *wine_format, LPCDIDATAFORMAT asked_format, int *offset) ;
extern DataFormat *create_DataFormat(const DIDATAFORMAT *wine_format, LPCDIDATAFORMAT asked_format, int *offset) ;
/* Used to fill events in the queue */
#define GEN_EVENT(offset,data,xtime,seq) \
......@@ -91,6 +91,8 @@ extern void _dump_EnumObjects_flags(DWORD dwFlags) ;
extern void _dump_DIPROPHEADER(DIPROPHEADER *diph) ;
extern void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) ;
extern void _dump_OBJECTINSTANCEW(DIDEVICEOBJECTINSTANCEW *ddoi) ;
extern void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) ;
extern const char *_dump_dinput_GUID(const GUID *guid) ;
/* And the stubs */
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(
......
......@@ -258,22 +258,10 @@ static HRESULT WINAPI JoystickAImpl_SetDataFormat(
)
{
ICOM_THIS(JoystickImpl,iface);
int i;
TRACE("(this=%p,%p)\n",This,df);
TRACE("(df.dwSize=%ld)\n",df->dwSize);
TRACE("(df.dwObjsize=%ld)\n",df->dwObjSize);
TRACE("(df.dwFlags=0x%08lx)\n",df->dwFlags);
TRACE("(df.dwDataSize=%ld)\n",df->dwDataSize);
TRACE("(df.dwNumObjs=%ld)\n",df->dwNumObjs);
for (i=0;i<df->dwNumObjs;i++) {
TRACE("df.rgodf[%d].guid %s (%p)\n",i,debugstr_guid(df->rgodf[i].pguid), df->rgodf[i].pguid);
TRACE("df.rgodf[%d].dwOfs %ld\n",i,df->rgodf[i].dwOfs);
TRACE("dwType 0x%02x,dwInstance %d\n",DIDFT_GETTYPE(df->rgodf[i].dwType),DIDFT_GETINSTANCE(df->rgodf[i].dwType));
TRACE("df.rgodf[%d].dwFlags 0x%08lx\n",i,df->rgodf[i].dwFlags);
}
_dump_DIDATAFORMAT(df);
/* Store the new data format */
This->df = HeapAlloc(GetProcessHeap(),0,df->dwSize);
......
......@@ -349,23 +349,11 @@ static HRESULT WINAPI JoystickAImpl_SetDataFormat(
)
{
ICOM_THIS(JoystickImpl,iface);
int i;
TRACE("(this=%p,%p)\n",This,df);
TRACE("(df.dwSize=%ld)\n",df->dwSize);
TRACE("(df.dwObjsize=%ld)\n",df->dwObjSize);
TRACE("(df.dwFlags=0x%08lx)\n",df->dwFlags);
TRACE("(df.dwDataSize=%ld)\n",df->dwDataSize);
TRACE("(df.dwNumObjs=%ld)\n",df->dwNumObjs);
for (i=0;i<df->dwNumObjs;i++) {
TRACE("df.rgodf[%d].guid %s (%p)\n",i,debugstr_guid(df->rgodf[i].pguid), df->rgodf[i].pguid);
TRACE("df.rgodf[%d].dwOfs %ld\n",i,df->rgodf[i].dwOfs);
TRACE("dwType 0x%02x,dwInstance %d\n",DIDFT_GETTYPE(df->rgodf[i].dwType),DIDFT_GETINSTANCE(df->rgodf[i].dwType));
TRACE("df.rgodf[%d].dwFlags 0x%08lx\n",i,df->rgodf[i].dwFlags);
}
_dump_DIDATAFORMAT(df);
/* Store the new data format */
This->df = HeapAlloc(GetProcessHeap(),0,df->dwSize);
memcpy(This->df, df, df->dwSize);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment