Module: wine Branch: master Commit: 85e2aa1d8adb6ef9e160ed8c2f8e1a50bb29bba0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=85e2aa1d8adb6ef9e160ed8c2f...
Author: Vitaliy Margolen wine-patches@kievinfo.com Date: Sat Jul 5 22:24:37 2008 -0600
dinput: Add more traces. Prevent some traces from dereferencing NULL pointer.
---
dlls/dinput/device.c | 2 +- dlls/dinput/effect_linuxinput.c | 6 +++--- dlls/dinput/joystick_linuxinput.c | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 2c4cc6d..54fefbe 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -179,7 +179,7 @@ const char *_dump_dinput_GUID(const GUID *guid) { return guids[i].name; } } - return "Unknown GUID"; + return debugstr_guid(guid); }
void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) { diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index 7d603bb..4a31ec1 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -191,7 +191,7 @@ static void _dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid) TRACE(" - dwTriggerRepeatInterval: %d\n", eff->dwTriggerRepeatInterval); TRACE(" - cAxes: %d\n", eff->cAxes); TRACE(" - rgdwAxes: %p\n", eff->rgdwAxes); - if (TRACE_ON(dinput)) { + if (TRACE_ON(dinput) && eff->rgdwAxes) { TRACE(" "); for (i = 0; i < eff->cAxes; ++i) TRACE("%d ", eff->rgdwAxes[i]); @@ -261,7 +261,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Download( if (errno == ENOMEM) { return DIERR_DEVICEFULL; } else { - FIXME("Could not upload effect. Assuming a disconnected device.\n"); + FIXME("Could not upload effect. Assuming a disconnected device %d "%s".\n", *This->fd, strerror(errno)); return DIERR_INPUTLOST; } } @@ -824,7 +824,7 @@ HRESULT linuxinput_create_effect( HeapFree(GetProcessHeap(), 0, newEffect); return DIERR_INVALIDPARAM; default: - FIXME("Unknown force type.\n"); + FIXME("Unknown force type 0x%x.\n", type); HeapFree(GetProcessHeap(), 0, newEffect); return DIERR_INVALIDPARAM; } diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 13bc1fb..24ed7d3 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -637,6 +637,8 @@ static HRESULT WINAPI JoystickAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface) } } } + else + WARN("Failed to acquire: %x\n", res);
return res; }