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
c7e5e6d2
Commit
c7e5e6d2
authored
Jun 28, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Jun 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Use ddraw_surface_release_iface to destroy leftover surfaces.
parent
7521ae42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-0
main.c
dlls/ddraw/main.c
+3
-4
surface.c
dlls/ddraw/surface.c
+3
-3
No files found.
dlls/ddraw/ddraw_private.h
View file @
c7e5e6d2
...
...
@@ -212,6 +212,7 @@ HRESULT ddraw_surface_create_texture(IDirectDrawSurfaceImpl *surface) DECLSPEC_H
void
ddraw_surface_destroy
(
IDirectDrawSurfaceImpl
*
surface
)
DECLSPEC_HIDDEN
;
HRESULT
ddraw_surface_init
(
IDirectDrawSurfaceImpl
*
surface
,
IDirectDrawImpl
*
ddraw
,
DDSURFACEDESC2
*
desc
,
UINT
mip_level
,
WINED3DSURFTYPE
surface_type
,
UINT
version
)
DECLSPEC_HIDDEN
;
ULONG
ddraw_surface_release_iface
(
IDirectDrawSurfaceImpl
*
This
)
DECLSPEC_HIDDEN
;
static
inline
IDirectDrawSurfaceImpl
*
surface_from_texture1
(
IDirect3DTexture
*
iface
)
{
...
...
dlls/ddraw/main.c
View file @
c7e5e6d2
...
...
@@ -752,7 +752,7 @@ DestroyCallback(IDirectDrawSurface7 *surf,
void
*
context
)
{
IDirectDrawSurfaceImpl
*
Impl
=
impl_from_IDirectDrawSurface7
(
surf
);
ULONG
ref
,
ref3
,
ref2
;
ULONG
ref
,
ref3
,
ref2
,
iface_count
;
ref
=
IDirectDrawSurface7_Release
(
surf
);
/* For the EnumSurfaces */
IDirectDrawSurface3_AddRef
(
&
Impl
->
IDirectDrawSurface3_iface
);
...
...
@@ -769,9 +769,8 @@ DestroyCallback(IDirectDrawSurface7 *surf,
return
DDENUMRET_OK
;
/* Destroy the surface */
while
(
ref
)
ref
=
IDirectDrawSurface7_Release
(
surf
);
while
(
ref3
)
ref3
=
IDirectDrawSurface3_Release
(
&
Impl
->
IDirectDrawSurface3_iface
);
while
(
ref2
)
ref2
=
IDirectDrawSurface2_Release
(
&
Impl
->
IDirectDrawSurface2_iface
);
iface_count
=
ddraw_surface_release_iface
(
Impl
);
while
(
iface_count
)
iface_count
=
ddraw_surface_release_iface
(
Impl
);
return
DDENUMRET_OK
;
}
...
...
dlls/ddraw/surface.c
View file @
c7e5e6d2
...
...
@@ -449,7 +449,7 @@ static void ddraw_surface_cleanup(IDirectDrawSurfaceImpl *surface)
IUnknown_Release
(
ifaceToRelease
);
}
static
void
ddraw_surface_release_iface
(
IDirectDrawSurfaceImpl
*
This
)
ULONG
ddraw_surface_release_iface
(
IDirectDrawSurfaceImpl
*
This
)
{
ULONG
iface_count
=
InterlockedDecrement
(
&
This
->
iface_count
);
TRACE
(
"%p decreasing iface count to %u.
\n
"
,
This
,
iface_count
);
...
...
@@ -462,7 +462,7 @@ static void ddraw_surface_release_iface(IDirectDrawSurfaceImpl *This)
{
WARN
(
"(%p) Attempt to destroy a surface that is not a complex root
\n
"
,
This
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
;
return
iface_count
;
}
if
(
This
->
wined3d_texture
)
/* If it's a texture, destroy the wined3d texture. */
wined3d_texture_decref
(
This
->
wined3d_texture
);
...
...
@@ -471,7 +471,7 @@ static void ddraw_surface_release_iface(IDirectDrawSurfaceImpl *This)
LeaveCriticalSection
(
&
ddraw_cs
);
}
return
;
return
iface_count
;
}
/*****************************************************************************
...
...
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