Henri Verbeet : d3d9: Only set WINED3D_SWAPCHAIN_GDI_COMPATIBLE on mappable swapchains.
Alexandre Julliard
julliard at winehq.org
Thu Nov 8 14:47:26 CST 2018
Module: wine
Branch: master
Commit: 2266e289514e234b250e2f366a53ef444edcfd08
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2266e289514e234b250e2f366a53ef444edcfd08
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Nov 8 21:47:03 2018 +0330
d3d9: Only set WINED3D_SWAPCHAIN_GDI_COMPATIBLE on mappable swapchains.
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d9/device.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index eaf162c..d6faa97 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -346,10 +346,11 @@ static BOOL wined3d_swapchain_desc_from_present_parameters(struct wined3d_swapch
= wined3dformat_from_d3dformat(present_parameters->AutoDepthStencilFormat);
swapchain_desc->flags
= (present_parameters->Flags & D3DPRESENTFLAGS_MASK) | WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH;
- if (is_gdi_compat_wined3dformat(swapchain_desc->backbuffer_format)
+ if ((present_parameters->Flags & D3DPRESENTFLAG_LOCKABLE_BACKBUFFER)
+ && (is_gdi_compat_wined3dformat(swapchain_desc->backbuffer_format)
/* WINED3DFMT_UNKNOWN creates the swapchain with the current
* display format, which is always GDI-compatible. */
- || swapchain_desc->backbuffer_format == WINED3DFMT_UNKNOWN)
+ || swapchain_desc->backbuffer_format == WINED3DFMT_UNKNOWN))
swapchain_desc->flags |= WINED3D_SWAPCHAIN_GDI_COMPATIBLE;
swapchain_desc->refresh_rate = present_parameters->FullScreen_RefreshRateInHz;
swapchain_desc->auto_restore_display_mode = TRUE;
More information about the wine-cvs
mailing list