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
ec754ab9
Commit
ec754ab9
authored
Jun 21, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Jun 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: AddRef the surface in AddAttachedSurface instead of helper function.
parent
4b8fd522
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
6 deletions
+43
-6
surface.c
dlls/ddraw/surface.c
+43
-6
No files found.
dlls/ddraw/surface.c
View file @
ec754ab9
...
...
@@ -1306,7 +1306,6 @@ static HRESULT ddraw_surface_attach_surface(IDirectDrawSurfaceImpl *This, IDirec
IDirect3DDeviceImpl_UpdateDepthStencil
(
This
->
ddraw
->
d3ddevice
);
}
ddraw_surface7_AddRef
(
&
Surf
->
IDirectDrawSurface7_iface
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
DD_OK
;
}
...
...
@@ -1315,6 +1314,7 @@ static HRESULT WINAPI ddraw_surface7_AddAttachedSurface(IDirectDrawSurface7 *ifa
{
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirectDrawSurface7
(
iface
);
IDirectDrawSurfaceImpl
*
Surf
=
unsafe_impl_from_IDirectDrawSurface7
(
Attach
);
HRESULT
hr
;
TRACE
(
"iface %p, attachment %p.
\n
"
,
iface
,
Attach
);
...
...
@@ -1327,23 +1327,38 @@ static HRESULT WINAPI ddraw_surface7_AddAttachedSurface(IDirectDrawSurface7 *ifa
return
DDERR_CANNOTATTACHSURFACE
;
}
return
ddraw_surface_attach_surface
(
This
,
Surf
);
hr
=
ddraw_surface_attach_surface
(
This
,
Surf
);
if
(
FAILED
(
hr
))
{
return
hr
;
}
ddraw_surface7_AddRef
(
Attach
);
return
hr
;
}
static
HRESULT
WINAPI
ddraw_surface4_AddAttachedSurface
(
IDirectDrawSurface4
*
iface
,
IDirectDrawSurface4
*
attachment
)
{
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirectDrawSurface4
(
iface
);
IDirectDrawSurfaceImpl
*
attachment_impl
=
unsafe_impl_from_IDirectDrawSurface4
(
attachment
);
HRESULT
hr
;
TRACE
(
"iface %p, attachment %p.
\n
"
,
iface
,
attachment
);
return
ddraw_surface7_AddAttachedSurface
(
&
This
->
IDirectDrawSurface7_iface
,
hr
=
ddraw_surface7_AddAttachedSurface
(
&
This
->
IDirectDrawSurface7_iface
,
attachment_impl
?
&
attachment_impl
->
IDirectDrawSurface7_iface
:
NULL
);
if
(
FAILED
(
hr
))
{
return
hr
;
}
ddraw_surface4_AddRef
(
attachment
);
ddraw_surface7_Release
(
&
attachment_impl
->
IDirectDrawSurface7_iface
);
return
hr
;
}
static
HRESULT
WINAPI
ddraw_surface3_AddAttachedSurface
(
IDirectDrawSurface3
*
iface
,
IDirectDrawSurface3
*
attachment
)
{
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirectDrawSurface3
(
iface
);
IDirectDrawSurfaceImpl
*
attach_impl
=
unsafe_impl_from_IDirectDrawSurface3
(
attachment
);
HRESULT
hr
;
TRACE
(
"iface %p, attachment %p.
\n
"
,
iface
,
attachment
);
...
...
@@ -1375,29 +1390,51 @@ static HRESULT WINAPI ddraw_surface3_AddAttachedSurface(IDirectDrawSurface3 *ifa
return
DDERR_CANNOTATTACHSURFACE
;
}
return
ddraw_surface_attach_surface
(
This
,
attach_impl
);
hr
=
ddraw_surface_attach_surface
(
This
,
attach_impl
);
if
(
FAILED
(
hr
))
{
return
hr
;
}
ddraw_surface3_AddRef
(
attachment
);
return
hr
;
}
static
HRESULT
WINAPI
ddraw_surface2_AddAttachedSurface
(
IDirectDrawSurface2
*
iface
,
IDirectDrawSurface2
*
attachment
)
{
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirectDrawSurface2
(
iface
);
IDirectDrawSurfaceImpl
*
attachment_impl
=
unsafe_impl_from_IDirectDrawSurface2
(
attachment
);
HRESULT
hr
;
TRACE
(
"iface %p, attachment %p.
\n
"
,
iface
,
attachment
);
return
ddraw_surface3_AddAttachedSurface
(
&
This
->
IDirectDrawSurface3_iface
,
hr
=
ddraw_surface3_AddAttachedSurface
(
&
This
->
IDirectDrawSurface3_iface
,
attachment_impl
?
&
attachment_impl
->
IDirectDrawSurface3_iface
:
NULL
);
if
(
FAILED
(
hr
))
{
return
hr
;
}
ddraw_surface2_AddRef
(
attachment
);
ddraw_surface3_Release
(
&
attachment_impl
->
IDirectDrawSurface3_iface
);
return
hr
;
}
static
HRESULT
WINAPI
ddraw_surface1_AddAttachedSurface
(
IDirectDrawSurface
*
iface
,
IDirectDrawSurface
*
attachment
)
{
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirectDrawSurface
(
iface
);
IDirectDrawSurfaceImpl
*
attachment_impl
=
unsafe_impl_from_IDirectDrawSurface
(
attachment
);
HRESULT
hr
;
TRACE
(
"iface %p, attachment %p.
\n
"
,
iface
,
attachment
);
return
ddraw_surface3_AddAttachedSurface
(
&
This
->
IDirectDrawSurface3_iface
,
hr
=
ddraw_surface3_AddAttachedSurface
(
&
This
->
IDirectDrawSurface3_iface
,
attachment_impl
?
&
attachment_impl
->
IDirectDrawSurface3_iface
:
NULL
);
if
(
FAILED
(
hr
))
{
return
hr
;
}
ddraw_surface1_AddRef
(
attachment
);
ddraw_surface3_Release
(
&
attachment_impl
->
IDirectDrawSurface3_iface
);
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