Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
43f5d8e5
Commit
43f5d8e5
authored
Sep 10, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Fix IDirect3DDevice8::SetRenderTarget().
The render target should be left alone if the render target argument is NULL. WineD3D calls should be done inside the critical section.
parent
01539fb9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
device.c
dlls/d3d8/device.c
+12
-3
No files found.
dlls/d3d8/device.c
View file @
43f5d8e5
...
...
@@ -805,13 +805,22 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderTarget(LPDIRECT3DDEVICE8 ifa
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
IDirect3DSurface8Impl
*
pSurface
=
(
IDirect3DSurface8Impl
*
)
pRenderTarget
;
IDirect3DSurface8Impl
*
pZSurface
=
(
IDirect3DSurface8Impl
*
)
pNewZStencil
;
IWineD3DSurface
*
original_ds
=
NULL
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
IWineD3DDevice_SetDepthStencilSurface
(
This
->
WineD3DDevice
,
NULL
==
pZSurface
?
NULL
:
pZSurface
->
wineD3DSurface
);
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DDevice_SetRenderTarget
(
This
->
WineD3DDevice
,
0
,
pSurface
?
pSurface
->
wineD3DSurface
:
NULL
);
hr
=
IWineD3DDevice_GetDepthStencilSurface
(
This
->
WineD3DDevice
,
&
original_ds
);
if
(
hr
==
WINED3D_OK
||
hr
==
WINED3DERR_NOTFOUND
)
{
hr
=
IWineD3DDevice_SetDepthStencilSurface
(
This
->
WineD3DDevice
,
pZSurface
?
pZSurface
->
wineD3DSurface
:
NULL
);
if
(
SUCCEEDED
(
hr
)
&&
pSurface
)
hr
=
IWineD3DDevice_SetRenderTarget
(
This
->
WineD3DDevice
,
0
,
pSurface
->
wineD3DSurface
);
if
(
FAILED
(
hr
))
IWineD3DDevice_SetDepthStencilSurface
(
This
->
WineD3DDevice
,
original_ds
);
}
if
(
original_ds
)
IWineD3DSurface_Release
(
original_ds
);
LeaveCriticalSection
(
&
d3d8_cs
);
return
hr
;
}
...
...
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