Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/swapchain.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index ea93212a24f9..7a3f1ff95e90 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -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); }