ddraw/device.c: Fixed Thunk_IDirect3DDeviceImpl_1_AddViewport

Stefan Dösinger stefandoesinger at gmx.at
Tue Nov 28 03:29:50 CST 2006


Am Montag 27 November 2006 11:23 schrieb Christoph Bumiller:
> This is my first "patch" - I was trying an old game with wine
> (Starfleet Academy), which crashed when using D3D, and I got the
> following trace messages:
>
> trace:ddraw_thunk:Thunk_IDirect3DDeviceImpl_1_AddViewport
> (0x1b440c)->(0x1f44f0) thunking to IDirect3DDevice3 interface.
> trace:ddraw_thunk:Thunk_IDirect3DDeviceImpl_2_GetStats
> (0x1b4408)->(0x1f44f0) thunking to IDirect3DDevice3 interface.
> fixme:d3d7:IDirect3DDeviceImpl_3_GetStats (0x1b4408)->(0x1f44f0): Stub!
>
> This looks like Thunk_IDirect3DDeviceImpl_1_AddViewport called the
> GetStats thunk
> which called GetStats with the viewport as argument, where it set some
> fields to
> 0, which resulted in a segfault in IDirect3DViewportImpl_SetBackground
> because IDirect3DViewportImpl->ddraw was NULL.
Good catch, yeah, your patch is correct. I blamed native d3drm.dll of calling 
GetStats with a viewport, but it turns out that it was my fault in the 
end :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20061128/1f65400a/attachment.pgp


More information about the wine-devel mailing list