Commit 1cc74ea2 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Allow creating swapchains for windows with empty client rect.

parent e9488b04
......@@ -796,15 +796,16 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
GetClientRect(window, &client_rect);
if (desc->windowed)
{
TRACE("Client rect %s.\n", wine_dbgstr_rect(&client_rect));
if (!desc->backbuffer_width)
{
desc->backbuffer_width = client_rect.right;
desc->backbuffer_width = client_rect.right ? client_rect.right : 8;
TRACE("Updating width to %u.\n", desc->backbuffer_width);
}
if (!desc->backbuffer_height)
{
desc->backbuffer_height = client_rect.bottom;
desc->backbuffer_height = client_rect.bottom ? client_rect.bottom : 8;
TRACE("Updating height to %u.\n", desc->backbuffer_height);
}
......
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