wined3d/d3d9: Set the initial scissor rect to the window size

Rico Schüller kgbricola at
Sat Aug 23 05:37:21 CDT 2008

Stefan Dösinger schrieb:
>>> Are you sure you shouldn't be using the primary swapchain's
>> backbuffer
>>> dimensions?
>> I'm not sure what exactly you mean.
> Something like this:
> IWineD3DSwapChain *swapchain;
> IWineD3DSurface *backbuffer;
> IWineD3DDevice_GetSwapChain(device, 0, &swapchain)
> IWineD3DSwapChain_GetBackBuffer(swapchain, &backbuffer);
> IWineD3DSurface_GetSurfaceDesc(backbuffer, &desc);
> IWineD3DSurface_Release(backbuffer);
> IWineD3DSwapChain_Release(swapchain);
> scissorrect = {0, 0, desc.Width, desc.Height};
> Just pseudocode, please look up the exact names of the methods and members.
> Maybe there's a IWineD3DDevice_GetBackBuffer method which spares you the
> extra GetSwapChain call. Don't forget the release calls.
> The difference between your original patch and this can be seen in Windowed
> mode. I recommend to put the appropriate test into dlls/d3d9/tests/device.c
> and create a Windowed device.
Here is the patch which checks the default scissorrect. I don't know if 
the resolutions are to big (1024x768). And I don't know if the stuff 
with the second swapchain (swapchain1) is correct. It produces this 
error in wine: "err:d3d:IWineD3DDeviceImpl_SetupFullscreenWindow 
(0x1e7370): Want to change the window parameters of HWND 0x20034, but 
another style is stored for restoration afterwards".

So comments are welcome.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: scissor_gut2.patch

More information about the wine-devel mailing list