Commit 43bfb240 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Use the context's current render target the get the swapchain drawable size.

"surface" might point to the frontbuffer while we're rendering to the backbuffer, etc.
parent 0047c55e
......@@ -404,7 +404,7 @@ WineD3DContext *IWineD3DSwapChainImpl_CreateContextForThread(IWineD3DSwapChain *
void get_drawable_size_swapchain(struct WineD3DContext *context, UINT *width, UINT *height)
{
IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)context->surface;
IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)context->current_rt;
/* The drawable size of an onscreen drawable is the surface size.
* (Actually: The window size, but the surface is created in window size) */
*width = surface->currentDesc.Width;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment