Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1bf30c03
Commit
1bf30c03
authored
May 26, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Hold the lock in swapchain methods.
parent
1d9874a0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
swapchain.c
dlls/d3d8/swapchain.c
+10
-1
No files found.
dlls/d3d8/swapchain.c
View file @
1bf30c03
...
@@ -56,7 +56,9 @@ static ULONG WINAPI IDirect3DSwapChain8Impl_Release(LPDIRECT3DSWAPCHAIN8 iface)
...
@@ -56,7 +56,9 @@ static ULONG WINAPI IDirect3DSwapChain8Impl_Release(LPDIRECT3DSWAPCHAIN8 iface)
TRACE
(
"(%p) : ReleaseRef to %d
\n
"
,
This
,
ref
);
TRACE
(
"(%p) : ReleaseRef to %d
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
if
(
ref
==
0
)
{
EnterCriticalSection
(
&
d3d8_cs
);
IWineD3DSwapChain_Destroy
(
This
->
wineD3DSwapChain
,
D3D8CB_DestroyRenderTarget
);
IWineD3DSwapChain_Destroy
(
This
->
wineD3DSwapChain
,
D3D8CB_DestroyRenderTarget
);
LeaveCriticalSection
(
&
d3d8_cs
);
if
(
This
->
parentDevice
)
IUnknown_Release
(
This
->
parentDevice
);
if
(
This
->
parentDevice
)
IUnknown_Release
(
This
->
parentDevice
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
}
...
@@ -66,8 +68,13 @@ static ULONG WINAPI IDirect3DSwapChain8Impl_Release(LPDIRECT3DSWAPCHAIN8 iface)
...
@@ -66,8 +68,13 @@ static ULONG WINAPI IDirect3DSwapChain8Impl_Release(LPDIRECT3DSWAPCHAIN8 iface)
/* IDirect3DSwapChain8 parts follow: */
/* IDirect3DSwapChain8 parts follow: */
static
HRESULT
WINAPI
IDirect3DSwapChain8Impl_Present
(
LPDIRECT3DSWAPCHAIN8
iface
,
CONST
RECT
*
pSourceRect
,
CONST
RECT
*
pDestRect
,
HWND
hDestWindowOverride
,
CONST
RGNDATA
*
pDirtyRegion
)
{
static
HRESULT
WINAPI
IDirect3DSwapChain8Impl_Present
(
LPDIRECT3DSWAPCHAIN8
iface
,
CONST
RECT
*
pSourceRect
,
CONST
RECT
*
pDestRect
,
HWND
hDestWindowOverride
,
CONST
RGNDATA
*
pDirtyRegion
)
{
IDirect3DSwapChain8Impl
*
This
=
(
IDirect3DSwapChain8Impl
*
)
iface
;
IDirect3DSwapChain8Impl
*
This
=
(
IDirect3DSwapChain8Impl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
TRACE
(
"(%p) Relay
\n
"
,
This
);
return
IWineD3DSwapChain_Present
(
This
->
wineD3DSwapChain
,
pSourceRect
,
pDestRect
,
hDestWindowOverride
,
pDirtyRegion
,
0
);
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DSwapChain_Present
(
This
->
wineD3DSwapChain
,
pSourceRect
,
pDestRect
,
hDestWindowOverride
,
pDirtyRegion
,
0
);
LeaveCriticalSection
(
&
d3d8_cs
);
return
hr
;
}
}
static
HRESULT
WINAPI
IDirect3DSwapChain8Impl_GetBackBuffer
(
LPDIRECT3DSWAPCHAIN8
iface
,
UINT
iBackBuffer
,
D3DBACKBUFFER_TYPE
Type
,
IDirect3DSurface8
**
ppBackBuffer
)
{
static
HRESULT
WINAPI
IDirect3DSwapChain8Impl_GetBackBuffer
(
LPDIRECT3DSWAPCHAIN8
iface
,
UINT
iBackBuffer
,
D3DBACKBUFFER_TYPE
Type
,
IDirect3DSurface8
**
ppBackBuffer
)
{
...
@@ -77,11 +84,13 @@ static HRESULT WINAPI IDirect3DSwapChain8Impl_GetBackBuffer(LPDIRECT3DSWAPCHAIN8
...
@@ -77,11 +84,13 @@ static HRESULT WINAPI IDirect3DSwapChain8Impl_GetBackBuffer(LPDIRECT3DSWAPCHAIN8
TRACE
(
"(%p) Relay
\n
"
,
This
);
TRACE
(
"(%p) Relay
\n
"
,
This
);
EnterCriticalSection
(
&
d3d8_cs
);
hrc
=
IWineD3DSwapChain_GetBackBuffer
(
This
->
wineD3DSwapChain
,
iBackBuffer
,
(
WINED3DBACKBUFFER_TYPE
)
Type
,
&
mySurface
);
hrc
=
IWineD3DSwapChain_GetBackBuffer
(
This
->
wineD3DSwapChain
,
iBackBuffer
,
(
WINED3DBACKBUFFER_TYPE
)
Type
,
&
mySurface
);
if
(
hrc
==
D3D_OK
&&
NULL
!=
mySurface
)
{
if
(
hrc
==
D3D_OK
&&
NULL
!=
mySurface
)
{
IWineD3DSurface_GetParent
(
mySurface
,
(
IUnknown
**
)
ppBackBuffer
);
IWineD3DSurface_GetParent
(
mySurface
,
(
IUnknown
**
)
ppBackBuffer
);
IWineD3DSurface_Release
(
mySurface
);
IWineD3DSurface_Release
(
mySurface
);
}
}
LeaveCriticalSection
(
&
d3d8_cs
);
return
hrc
;
return
hrc
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment