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
0086d490
Commit
0086d490
authored
May 20, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Hold the lock in IDirectDrawClipper methods.
parent
d5d7d4da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
10 deletions
+32
-10
clipper.c
dlls/ddraw/clipper.c
+32
-10
No files found.
dlls/ddraw/clipper.c
View file @
0086d490
...
...
@@ -106,8 +106,10 @@ static ULONG WINAPI IDirectDrawClipperImpl_Release(IDirectDrawClipper *iface) {
if
(
ref
==
0
)
{
EnterCriticalSection
(
&
ddraw_cs
);
IWineD3DClipper_Release
(
This
->
wineD3DClipper
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
0
;
}
else
return
ref
;
...
...
@@ -135,9 +137,11 @@ static HRESULT WINAPI IDirectDrawClipperImpl_SetHwnd(
HRESULT
hr
;
TRACE
(
"(%p)->(%08x,%p)
\n
"
,
This
,
dwFlags
,
hWnd
);
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DClipper_SetHWnd
(
This
->
wineD3DClipper
,
dwFlags
,
hWnd
);
LeaveCriticalSection
(
&
ddraw_cs
);
switch
(
hr
)
{
case
WINED3DERR_INVALIDCALL
:
return
DDERR_INVALIDPARAMS
;
...
...
@@ -168,12 +172,16 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetClipList(
LPDWORD
lpdwSize
)
{
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
This
,
lpRect
,
lpClipList
,
lpdwSize
);
return
IWineD3DClipper_GetClipList
(
This
->
wineD3DClipper
,
lpRect
,
lpClipList
,
lpdwSize
);
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DClipper_GetClipList
(
This
->
wineD3DClipper
,
lpRect
,
lpClipList
,
lpdwSize
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
/*****************************************************************************
...
...
@@ -194,10 +202,14 @@ static HRESULT WINAPI IDirectDrawClipperImpl_SetClipList(
LPDIRECTDRAWCLIPPER
iface
,
LPRGNDATA
lprgn
,
DWORD
dwFlag
)
{
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
HRESULT
hr
;
return
IWineD3DClipper_SetClipList
(
This
->
wineD3DClipper
,
lprgn
,
dwFlag
);
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DClipper_SetClipList
(
This
->
wineD3DClipper
,
lprgn
,
dwFlag
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
/*****************************************************************************
...
...
@@ -215,10 +227,14 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetHWnd(
LPDIRECTDRAWCLIPPER
iface
,
HWND
*
hWndPtr
)
{
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
hWndPtr
);
return
IWineD3DClipper_GetHWnd
(
This
->
wineD3DClipper
,
hWndPtr
);
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DClipper_GetHWnd
(
This
->
wineD3DClipper
,
hWndPtr
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
/*****************************************************************************
...
...
@@ -242,11 +258,17 @@ static HRESULT WINAPI IDirectDrawClipperImpl_Initialize(
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
TRACE
(
"(%p)->(%p,0x%08x)
\n
"
,
This
,
lpDD
,
dwFlags
);
if
(
This
->
ddraw_owner
!=
NULL
)
return
DDERR_ALREADYINITIALIZED
;
EnterCriticalSection
(
&
ddraw_cs
);
if
(
This
->
ddraw_owner
!=
NULL
)
{
LeaveCriticalSection
(
&
ddraw_cs
);
return
DDERR_ALREADYINITIALIZED
;
}
pOwner
=
ICOM_OBJECT
(
IDirectDrawImpl
,
IDirectDraw
,
lpDD
);
This
->
ddraw_owner
=
pOwner
;
LeaveCriticalSection
(
&
ddraw_cs
);
return
DD_OK
;
}
...
...
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