Maarten Lankhorst wrote:
Hi Martin,
2008/6/27 Martin <martin.marsan(a)gmail.com>:
Hi.
I am working on a patch to fix a bug which prevents certain games from starting. The bug will make wine spit out:
fixme:dsound3d:IDirectSound3DListenerImpl_QueryInterface Unknown IID {31efac30-515c-11d0-a9aa-00aa0061be93} right before it crashes(see bug 12240).
I am working on implementing the ability to return this interface by calling the function that fails(IDirectSound3DListenerImpl_QueryInterface()) with an already acquired (dsound?) interface and IID being IKsPropertySet. I was able to make a patch which helped me get around this bug in one game, but I don't have very deep knowledge of how wine works internally. Because of that, I am not sure if I should implement something more to prevent other issues. Also, I don't know if I need to make some changes to make the patch more "correct" or complete. If somebody could have a look at the patch, or try it out or give me any other feedback, that would be appreciated. If you aren't sure, try creating a simple test for it.
Cheers, Maarten.
This would probably be a better patch: int nobuff = This->device->nrofbuffers - 1; char *buffer = NULL; if (nobuff < 0) nobuff = 0; else if (!nobuff) nobuff = 1; if (!( This->device->buffers[no buff] )) { ERR(" no device\n"); return false; } buffer = This->device->buffers[no buff]; if (This->device->buffers) IKsBufferPropertySetImpl_Create(nobuff,(&This->device->buffers[nobuff]->iks)); Chrisb