Skip to content

Commit

Permalink
[WINESYNC] wined3d: Lock wined3d mutex in wined3d_swapchain_present().
Browse files Browse the repository at this point in the history
Signed-off-by: Józef Kucia <[email protected]>
Signed-off-by: Henri Verbeet <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>

wine commit id 9042fbe1e4838136bd68905df13fb3264af9a64d by Józef Kucia <[email protected]>
  • Loading branch information
winesync authored and DarkFire01 committed Sep 12, 2023
1 parent 51b5b59 commit 4c3070e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions dll/directx/wine/d3d8/swapchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d8_swapchain_Present(IDirect3DSwapChai
{
struct d3d8_swapchain *swapchain = impl_from_IDirect3DSwapChain8(iface);
struct d3d8_device *device = impl_from_IDirect3DDevice8(swapchain->parent_device);
HRESULT hr;

TRACE("iface %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p.\n",
iface, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect), dst_window_override, dirty_region);
Expand All @@ -99,12 +98,8 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d8_swapchain_Present(IDirect3DSwapChai
if (dirty_region)
FIXME("Ignoring dirty_region %p.\n", dirty_region);

wined3d_mutex_lock();
hr = wined3d_swapchain_present(swapchain->wined3d_swapchain,
return wined3d_swapchain_present(swapchain->wined3d_swapchain,
src_rect, dst_rect, dst_window_override, swapchain->swap_interval, 0);
wined3d_mutex_unlock();

return hr;
}

static HRESULT WINAPI d3d8_swapchain_GetBackBuffer(IDirect3DSwapChain8 *iface,
Expand Down
7 changes: 1 addition & 6 deletions dll/directx/wine/d3d9/swapchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_swapchain_Present(IDirect3DSwapChai
{
struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9Ex(iface);
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(swapchain->parent_device);
HRESULT hr;

TRACE("iface %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p, flags %#x.\n",
iface, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect),
Expand All @@ -152,12 +151,8 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_swapchain_Present(IDirect3DSwapChai
if (dirty_region)
FIXME("Ignoring dirty_region %p.\n", dirty_region);

wined3d_mutex_lock();
hr = wined3d_swapchain_present(swapchain->wined3d_swapchain,
return wined3d_swapchain_present(swapchain->wined3d_swapchain,
src_rect, dst_rect, dst_window_override, swapchain->swap_interval, flags);
wined3d_mutex_unlock();

return hr;
}

static HRESULT WINAPI d3d9_swapchain_GetFrontBufferData(IDirect3DSwapChain9Ex *iface, IDirect3DSurface9 *surface)
Expand Down

0 comments on commit 4c3070e

Please sign in to comment.