Module: wine Branch: master Commit: 1cc74ea21582f3ad6a50183b261b494b86312135 URL: https://source.winehq.org/git/wine.git/?a=commit;h=1cc74ea21582f3ad6a50183b2...
Author: Józef Kucia jkucia@codeweavers.com Date: Thu May 17 15:46:54 2018 +0200
wined3d: Allow creating swapchains for windows with empty client rect.
Signed-off-by: Józef Kucia jkucia@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 ea93212..7a3f1ff 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); }