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
31d6dbfd
Commit
31d6dbfd
authored
Oct 07, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Cleanup CreateAdditionalSwapChain error handling a bit (LLVM/Clang).
parent
0420f17b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
device.c
dlls/wined3d/device.c
+9
-5
No files found.
dlls/wined3d/device.c
View file @
31d6dbfd
...
...
@@ -1395,7 +1395,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
HDC
hDc
;
IWineD3DSwapChainImpl
*
object
;
/** NOTE: impl ref allowed since this is a create function **/
HRESULT
hr
=
WINED3D_OK
;
HRESULT
hr
;
IUnknown
*
bufferParent
;
BOOL
displaymode_set
=
FALSE
;
WINED3DDISPLAYMODE
Mode
;
...
...
@@ -1501,7 +1501,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
TRUE
/* Lockable */
,
&
object
->
frontBuffer
,
NULL
/* pShared (always null)*/
);
if
(
object
->
frontBuffer
!=
NULL
)
{
if
(
SUCCEEDED
(
hr
)
)
{
IWineD3DSurface_SetContainer
(
object
->
frontBuffer
,
(
IWineD3DBase
*
)
object
);
if
(
surface_type
==
SURFACE_OPENGL
)
{
IWineD3DSurface_ModifyLocation
(
object
->
frontBuffer
,
SFLAG_INDRAWABLE
,
TRUE
);
...
...
@@ -1586,7 +1586,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
TRUE
/* Lockable */
,
&
object
->
backBuffer
[
i
],
NULL
/* pShared (always null)*/
);
if
(
hr
==
WINED3D_OK
&&
object
->
backBuffer
[
i
]
)
{
if
(
SUCCEEDED
(
hr
)
)
{
IWineD3DSurface_SetContainer
(
object
->
backBuffer
[
i
],
(
IWineD3DBase
*
)
object
);
}
else
{
ERR
(
"Cannot create new back buffer
\n
"
);
...
...
@@ -1612,7 +1612,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
}
/* Under directX swapchains share the depth stencil, so only create one depth-stencil */
if
(
pPresentationParameters
->
EnableAutoDepthStencil
&&
hr
==
WINED3D_OK
&&
surface_type
==
SURFACE_OPENGL
)
{
if
(
pPresentationParameters
->
EnableAutoDepthStencil
&&
surface_type
==
SURFACE_OPENGL
)
{
TRACE
(
"Creating depth stencil buffer
\n
"
);
if
(
This
->
auto_depth_stencil_buffer
==
NULL
)
{
hr
=
D3DCB_CreateDepthStencil
(
This
->
parent
,
...
...
@@ -1625,8 +1625,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
FALSE
/* FIXME: Discard */
,
&
This
->
auto_depth_stencil_buffer
,
NULL
/* pShared (always null)*/
);
if
(
This
->
auto_depth_stencil_buffer
!=
NULL
)
if
(
SUCCEEDED
(
hr
))
{
IWineD3DSurface_SetContainer
(
This
->
auto_depth_stencil_buffer
,
0
);
}
else
{
ERR
(
"Failed to create the auto depth stencil
\n
"
);
goto
error
;
}
}
}
...
...
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