http://bugs.winehq.org/show_bug.cgi?id=19563
Summary: Guitar Hero World Tour crashes after dinput's QueryInterface Product: Wine Version: 1.1.26 Platform: PC URL: http://worldtour.guitarhero.com/uk/ OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-dinput AssignedTo: wine-bugs@winehq.org ReportedBy: andras@csevego.net
After fixing bug 19562, the next problem will be, we are not offering IDirectInputDevice8W in IDirectInputDevice2AImpl_QueryInterface. This will result in null pointer access.
It can fixed by adding IDirectInputDevice8W to IDirectInputDevice2AImpl_QueryInterface, but proper tests needed, what does dinput on windows.
Patch:
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 941206c..cb66b03 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -753,6 +753,14 @@ HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface( *ppobj = This; return DI_OK; } + + if (IsEqualGUID(&IID_IDirectInputDevice8W,riid)) { + IDirectInputDevice8_AddRef(iface); + *ppobj = This; + return DI_OK; + } + + TRACE("Unsupported interface !\n"); return E_FAIL; }