Nikolay Sivov : d3d9: Ask for texture GetDC() capability GET_DC based on texture format instead of initial swapchain buffer format.
Alexandre Julliard
julliard at winehq.org
Fri Sep 15 13:12:05 CDT 2017
Module: wine
Branch: master
Commit: 67689049e2608e46761765eb8412e6ec423670c5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=67689049e2608e46761765eb8412e6ec423670c5
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri Sep 15 08:14:34 2017 +0300
d3d9: Ask for texture GetDC() capability GET_DC based on texture format instead of initial swapchain buffer format.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
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 b4cb253..cd42cbc 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -239,8 +239,6 @@ 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))
- swapchain_desc->flags |= WINED3D_SWAPCHAIN_GDI_COMPATIBLE;
swapchain_desc->refresh_rate = present_parameters->FullScreen_RefreshRateInHz;
swapchain_desc->swap_interval = present_parameters->PresentationInterval;
swapchain_desc->auto_restore_display_mode = TRUE;
@@ -3922,6 +3920,9 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic
if (container_parent == device_parent)
container_parent = &device->IDirect3DDevice9Ex_iface;
+ if (is_gdi_compat_wined3dformat(desc->format))
+ texture_flags |= WINED3D_TEXTURE_CREATE_GET_DC;
+
if (FAILED(hr = wined3d_texture_create(device->wined3d_device, desc, 1, 1,
texture_flags | WINED3D_TEXTURE_CREATE_MAPPABLE, NULL, container_parent,
&d3d9_null_wined3d_parent_ops, texture)))
More information about the wine-cvs
mailing list