GlobalShortcut_win: when adding a DirectInput device, log its dwDevType.

We've previously resorted to blacklisting devices that cause hangs and
other issues.

The goal of logging dwDevType here is to be able to diagnose such issues
in the future. It would be interesting to know what such devices advertise
themselves as to DirectInput.

Perhaps, once we have more data, we can limit the amount of devices we
query, instead of querying all devices all the time.
This commit is contained in:
Mikkel Krautz 2016-07-18 14:29:40 +02:00
parent 00f4e06340
commit c2eb8013d4

View File

@ -543,7 +543,13 @@ BOOL GlobalShortcutWin::EnumDevicesCB(LPCDIDEVICEINSTANCE pdidi, LPVOID pContext
if (FAILED(hr = id->pDID->SetProperty(DIPROP_BUFFERSIZE, &dipdw.diph)))
qFatal("GlobalShortcutWin: SetProperty: %lx", hr);
qWarning("Adding device %s %s %s:%d", qPrintable(QUuid(id->guid).toString()),qPrintable(name),qPrintable(sname),id->qhNames.count());
qWarning("Adding device %s %s %s:%d type 0x%.8x",
qPrintable(QUuid(id->guid).toString()),
qPrintable(name),
qPrintable(sname),
id->qhNames.count(),
pdidi->dwDevType);
cbgsw->qhInputDevices[id->guid] = id;
} else {
id->pDID->Release();