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
325f666f
Commit
325f666f
authored
Dec 15, 2006
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Dec 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: IDirectDraw3 should use its own ref count variable.
parent
f26cb44c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-1
ddraw_thunks.c
dlls/ddraw/ddraw_thunks.c
+4
-4
main.c
dlls/ddraw/main.c
+3
-1
No files found.
dlls/ddraw/ddraw_private.h
View file @
325f666f
...
...
@@ -96,7 +96,7 @@ struct IDirectDrawImpl
ICOM_VFIELD_MULTI
(
IDirect3D
);
/* See comment in IDirectDraw::AddRef */
LONG
ref7
,
ref4
,
ref2
,
ref1
,
numIfaces
;
LONG
ref7
,
ref4
,
ref2
,
ref
3
,
ref
1
,
numIfaces
;
/* WineD3D linkage */
IWineD3D
*
wineD3D
;
...
...
dlls/ddraw/ddraw_thunks.c
View file @
325f666f
...
...
@@ -110,9 +110,9 @@ static ULONG WINAPI
IDirectDraw3Impl_AddRef
(
LPDIRECTDRAW3
iface
)
{
ICOM_THIS_FROM
(
IDirectDrawImpl
,
IDirectDraw3
,
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
4
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
3
);
TRACE
(
"(%p) : incrementing IDirectDraw
4
refcount from %u.
\n
"
,
This
,
ref
-
1
);
TRACE
(
"(%p) : incrementing IDirectDraw
3
refcount from %u.
\n
"
,
This
,
ref
-
1
);
if
(
ref
==
1
)
InterlockedIncrement
(
&
This
->
numIfaces
);
...
...
@@ -170,9 +170,9 @@ static ULONG WINAPI
IDirectDraw3Impl_Release
(
LPDIRECTDRAW3
iface
)
{
ICOM_THIS_FROM
(
IDirectDrawImpl
,
IDirectDraw3
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
4
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
3
);
TRACE_
(
ddraw
)(
"(%p)->() decrementing IDirectDraw
4
refcount from %u.
\n
"
,
This
,
ref
+
1
);
TRACE_
(
ddraw
)(
"(%p)->() decrementing IDirectDraw
3
refcount from %u.
\n
"
,
This
,
ref
+
1
);
if
(
ref
==
0
)
{
...
...
dlls/ddraw/main.c
View file @
325f666f
...
...
@@ -882,11 +882,12 @@ DllMain(HINSTANCE hInstDLL,
int
i
;
IDirectDrawImpl
*
ddraw
=
LIST_ENTRY
(
entry
,
IDirectDrawImpl
,
ddraw_list_entry
);
WARN
(
"DDraw %p has a refcount of %d
\n
"
,
ddraw
,
ddraw
->
ref7
+
ddraw
->
ref4
+
ddraw
->
ref2
+
ddraw
->
ref1
);
WARN
(
"DDraw %p has a refcount of %d
\n
"
,
ddraw
,
ddraw
->
ref7
+
ddraw
->
ref4
+
ddraw
->
ref
3
+
ddraw
->
ref
2
+
ddraw
->
ref1
);
/* Add references to each interface to avoid freeing them unexpectadely */
IDirectDraw_AddRef
(
ICOM_INTERFACE
(
ddraw
,
IDirectDraw
));
IDirectDraw2_AddRef
(
ICOM_INTERFACE
(
ddraw
,
IDirectDraw2
));
IDirectDraw3_AddRef
(
ICOM_INTERFACE
(
ddraw
,
IDirectDraw3
));
IDirectDraw4_AddRef
(
ICOM_INTERFACE
(
ddraw
,
IDirectDraw4
));
IDirectDraw7_AddRef
(
ICOM_INTERFACE
(
ddraw
,
IDirectDraw7
));
...
...
@@ -925,6 +926,7 @@ DllMain(HINSTANCE hInstDLL,
*/
while
(
IDirectDraw_Release
(
ICOM_INTERFACE
(
ddraw
,
IDirectDraw
)));
while
(
IDirectDraw2_Release
(
ICOM_INTERFACE
(
ddraw
,
IDirectDraw2
)));
while
(
IDirectDraw3_Release
(
ICOM_INTERFACE
(
ddraw
,
IDirectDraw3
)));
while
(
IDirectDraw4_Release
(
ICOM_INTERFACE
(
ddraw
,
IDirectDraw4
)));
while
(
IDirectDraw7_Release
(
ICOM_INTERFACE
(
ddraw
,
IDirectDraw7
)));
}
...
...
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