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
9e50efd8
Commit
9e50efd8
authored
Jun 20, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Use unsafe_impl_from_IDirectDrawClipper for an app provided iface.
parent
588ddee7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
clipper.c
dlls/ddraw/clipper.c
+9
-0
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-0
surface.c
dlls/ddraw/surface.c
+10
-8
No files found.
dlls/ddraw/clipper.c
View file @
9e50efd8
...
...
@@ -308,3 +308,12 @@ HRESULT ddraw_clipper_init(IDirectDrawClipperImpl *clipper)
return
DD_OK
;
}
IDirectDrawClipperImpl
*
unsafe_impl_from_IDirectDrawClipper
(
IDirectDrawClipper
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
&
ddraw_clipper_vtbl
);
return
impl_from_IDirectDrawClipper
(
iface
);
}
dlls/ddraw/ddraw_private.h
View file @
9e50efd8
...
...
@@ -366,6 +366,7 @@ struct IDirectDrawClipperImpl
};
HRESULT
ddraw_clipper_init
(
IDirectDrawClipperImpl
*
clipper
)
DECLSPEC_HIDDEN
;
IDirectDrawClipperImpl
*
unsafe_impl_from_IDirectDrawClipper
(
IDirectDrawClipper
*
iface
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
* IDirectDrawPalette implementation structure
...
...
dlls/ddraw/surface.c
View file @
9e50efd8
...
...
@@ -3624,26 +3624,28 @@ static HRESULT WINAPI ddraw_surface1_GetClipper(IDirectDrawSurface *iface, IDire
* DD_OK on success
*
*****************************************************************************/
static
HRESULT
WINAPI
ddraw_surface7_SetClipper
(
IDirectDrawSurface7
*
iface
,
IDirectDrawClipper
*
Clipper
)
static
HRESULT
WINAPI
ddraw_surface7_SetClipper
(
IDirectDrawSurface7
*
iface
,
IDirectDrawClipper
*
iclipper
)
{
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirectDrawSurface7
(
iface
);
IDirectDrawClipperImpl
*
clipper
=
unsafe_impl_from_IDirectDrawClipper
(
iclipper
);
IDirectDrawClipperImpl
*
oldClipper
=
This
->
clipper
;
HWND
clipWindow
;
HRESULT
hr
;
TRACE
(
"iface %p, clipper %p.
\n
"
,
iface
,
C
lipper
);
TRACE
(
"iface %p, clipper %p.
\n
"
,
iface
,
ic
lipper
);
EnterCriticalSection
(
&
ddraw_cs
);
if
(
(
IDirectDrawClipperImpl
*
)
C
lipper
==
This
->
clipper
)
if
(
c
lipper
==
This
->
clipper
)
{
LeaveCriticalSection
(
&
ddraw_cs
);
return
DD_OK
;
}
This
->
clipper
=
(
IDirectDrawClipperImpl
*
)
C
lipper
;
This
->
clipper
=
c
lipper
;
if
(
C
lipper
!=
NULL
)
IDirectDrawClipper_AddRef
(
C
lipper
);
if
(
c
lipper
!=
NULL
)
IDirectDrawClipper_AddRef
(
ic
lipper
);
if
(
oldClipper
)
IDirectDrawClipper_Release
(
&
oldClipper
->
IDirectDrawClipper_iface
);
...
...
@@ -3653,8 +3655,8 @@ static HRESULT WINAPI ddraw_surface7_SetClipper(IDirectDrawSurface7 *iface, IDir
if
(
This
->
wined3d_swapchain
)
{
clipWindow
=
NULL
;
if
(
C
lipper
)
{
IDirectDrawClipper_GetHWnd
(
C
lipper
,
&
clipWindow
);
if
(
c
lipper
)
{
IDirectDrawClipper_GetHWnd
(
ic
lipper
,
&
clipWindow
);
}
if
(
clipWindow
)
...
...
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