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
5307dd20
Commit
5307dd20
authored
May 18, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Make the ddraw list lock a global dll lock.
parent
2e67fa32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
ddraw_private.h
dlls/ddraw/ddraw_private.h
+3
-0
main.c
dlls/ddraw/main.c
+10
-11
No files found.
dlls/ddraw/ddraw_private.h
View file @
5307dd20
...
@@ -80,6 +80,9 @@ extern ULONG WINAPI D3D7CB_DestroySwapChain(IWineD3DSwapChain *pSwapChain);
...
@@ -80,6 +80,9 @@ extern ULONG WINAPI D3D7CB_DestroySwapChain(IWineD3DSwapChain *pSwapChain);
extern
ULONG
WINAPI
D3D7CB_DestroyDepthStencilSurface
(
IWineD3DSurface
*
pSurface
);
extern
ULONG
WINAPI
D3D7CB_DestroyDepthStencilSurface
(
IWineD3DSurface
*
pSurface
);
/* Global critical section */
extern
CRITICAL_SECTION
ddraw_cs
;
/*****************************************************************************
/*****************************************************************************
* IDirectDraw implementation structure
* IDirectDraw implementation structure
*****************************************************************************/
*****************************************************************************/
...
...
dlls/ddraw/main.c
View file @
5307dd20
...
@@ -59,15 +59,14 @@ WINED3DSURFTYPE DefaultSurfaceType = SURFACE_UNKNOWN;
...
@@ -59,15 +59,14 @@ WINED3DSURFTYPE DefaultSurfaceType = SURFACE_UNKNOWN;
/* DDraw list and critical section */
/* DDraw list and critical section */
static
struct
list
global_ddraw_list
=
LIST_INIT
(
global_ddraw_list
);
static
struct
list
global_ddraw_list
=
LIST_INIT
(
global_ddraw_list
);
static
CRITICAL_SECTION
ddraw_list_cs
;
static
CRITICAL_SECTION_DEBUG
ddraw_cs_debug
=
static
CRITICAL_SECTION_DEBUG
ddraw_list_cs_debug
=
{
{
0
,
0
,
&
ddraw_
list_
cs
,
0
,
0
,
&
ddraw_cs
,
{
&
ddraw_
list_cs_debug
.
ProcessLocksList
,
{
&
ddraw_
cs_debug
.
ProcessLocksList
,
&
ddraw_
list_
cs_debug
.
ProcessLocksList
},
&
ddraw_cs_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": ddraw_
list_
cs"
)
}
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": ddraw_cs"
)
}
};
};
static
CRITICAL_SECTION
ddraw_list_cs
=
{
&
ddraw_list
_cs_debug
,
-
1
,
0
,
0
,
0
,
0
};
CRITICAL_SECTION
ddraw_cs
=
{
&
ddraw
_cs_debug
,
-
1
,
0
,
0
,
0
,
0
};
/***********************************************************************
/***********************************************************************
*
*
...
@@ -319,9 +318,9 @@ DDRAW_Create(const GUID *guid,
...
@@ -319,9 +318,9 @@ DDRAW_Create(const GUID *guid,
list_init
(
&
This
->
surface_list
);
list_init
(
&
This
->
surface_list
);
EnterCriticalSection
(
&
ddraw_
list_
cs
);
EnterCriticalSection
(
&
ddraw_cs
);
list_add_head
(
&
global_ddraw_list
,
&
This
->
ddraw_list_entry
);
list_add_head
(
&
global_ddraw_list
,
&
This
->
ddraw_list_entry
);
LeaveCriticalSection
(
&
ddraw_
list_
cs
);
LeaveCriticalSection
(
&
ddraw_cs
);
This
->
decls
=
HeapAlloc
(
GetProcessHeap
(),
0
,
0
);
This
->
decls
=
HeapAlloc
(
GetProcessHeap
(),
0
,
0
);
if
(
!
This
->
decls
)
if
(
!
This
->
decls
)
...
@@ -948,7 +947,7 @@ DllMain(HINSTANCE hInstDLL,
...
@@ -948,7 +947,7 @@ DllMain(HINSTANCE hInstDLL,
void
void
remove_ddraw_object
(
IDirectDrawImpl
*
ddraw
)
remove_ddraw_object
(
IDirectDrawImpl
*
ddraw
)
{
{
EnterCriticalSection
(
&
ddraw_
list_
cs
);
EnterCriticalSection
(
&
ddraw_cs
);
list_remove
(
&
ddraw
->
ddraw_list_entry
);
list_remove
(
&
ddraw
->
ddraw_list_entry
);
LeaveCriticalSection
(
&
ddraw_
list_
cs
);
LeaveCriticalSection
(
&
ddraw_cs
);
}
}
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